In line 11 change = with ==
You and fix the while loop cause you have an infinite loop. There is no need of try/except here.
Any input is a string so no need for conversion.
The choices don't correspond to the input. You are asking for 'q' but there is 'p'.
You and fix the while loop cause you have an infinite loop. There is no need of try/except here.
Any input is a string so no need for conversion.
The choices don't correspond to the input. You are asking for 'q' but there is 'p'.
while True: mode = input("There are three modes to this game: quadratic, interest, and order of operations. Type 'q' for quadratics, 'i' for interest, and 'o' for order of ops.") if mode == 'p': print("You have selected quadratics.") break elif mode == 'i': print("You have selected interest.") break elif mode == 'o': print("You have selected order of operations.") break else: print("Sorry, but you didn't correctly choose a valid mode. Press any key to continue.")