We’re rewarding the question askers & reputations are being recalculated! Read more.

 2 Corrected a programming mistake edited Dec 16 '17 at 17:18 13ros27 33011 silver badge1414 bronze badges 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 answered Dec 15 '17 at 21:16 13ros27 33011 silver badge1414 bronze badges 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