Mar-08-2018, 07:14 PM
Hi,
I'm trying to make a python game called Math God, which has three subjects:
1. Quadratics
2. Interest
3. Order of Ops.
I'm trying to make an if statement inside the try statement, but I keep getting a bad input error.
Here's my code.
I'm trying to make a python game called Math God, which has three subjects:
1. Quadratics
2. Interest
3. Order of Ops.
I'm trying to make an if statement inside the try statement, but I keep getting a bad input error.
Here's my code.
#Math God #By Trenton #Made in 2018 #You answer questions correctly in under a minute. Each correct answer is worth 50 points. Get one wrong and you get a strike. Three strikes and the game ends. There are three subjects: quadratics, interest, and order of ops. Each contain 50 questions selected at random within that subject. input("Math God Press any key to start") print("Welcome to Math God! Made by Trent in 2018!") print("In this game, you have a minute to answer the math problem correctly. If you get it wrong or run out of time, you get a strike. Three strikes and the game is over.") try: x=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 x = 'p': input("You have selected quadratics. Press any key to start." else if x = 'i': input("You have selected interest. Press any key to start.") else if x = 'o': input("You have selected order of operations. Press any key to start.") except: input("Sorry, but you didn't correctly choose a valid mode. Press any key to continue.") returnIf you could tell me what I'm doing wrong, that would be great