How you would stop a user from breaking the code by entering an incorrect function? For example:
category = raw_input("Please choose the number of the category you which to play with!")
if category == 1:
print "Thankyou for choosing",category,".The game will commence shortly!"
if category == 2:
print "Thankyou for choosing",category,".The game will commence shortly!"
if category == 3:
print "Thankyou for choosing",category,".The game will commence shortly!"
else:
print "Incorrect input choose again!"
This works but when I put a correct input in the code it still comes up with 'Incorrect input choose again!' How would I go about to solve this?