We’re rewarding the question askers & reputations are being recalculated! Read more.
2 Corrected a programming mistake
source | link

A shorter way to do the answer checking is to do them both together:

def answercheck(score, user_answer, answerstr_answer, int_answer):
    if user_answer.upper() == strstr_answer or user_answer.upper(answer) == int_answer:
        print("Well done")
        score+=1
    else:
        print ("Wrong, it was "+str(answer))
    raw_input("Press enter to continue")
    return score

NOTE: This will mean the rest of the code will have to be edited to just always send to answercheck

A shorter way to do the answer checking is to do them both together:

def answercheck(score, user_answer, answer):
    if user_answer.upper() == str(answer):
        print("Well done")
        score+=1
    else:
        print ("Wrong, it was "+str(answer))
    raw_input("Press enter to continue")
    return score

NOTE: This will mean the rest of the code will have to be edited to just always send to answercheck

A shorter way to do the answer checking is to do them both together:

def answercheck(score, user_answer, str_answer, int_answer):
    if user_answer.upper() == str_answer or user_answer.upper() == int_answer:
        print("Well done")
        score+=1
    else:
        print ("Wrong, it was "+str(answer))
    raw_input("Press enter to continue")
    return score

NOTE: This will mean the rest of the code will have to be edited to just always send to answercheck

1
source | link

A shorter way to do the answer checking is to do them both together:

def answercheck(score, user_answer, answer):
    if user_answer.upper() == str(answer):
        print("Well done")
        score+=1
    else:
        print ("Wrong, it was "+str(answer))
    raw_input("Press enter to continue")
    return score

NOTE: This will mean the rest of the code will have to be edited to just always send to answercheck