Python's newbie is here trying to limit the quiz entry to only 1.2 or 3.
If the text is entered, the program crashes (because the text input is not recognized)
Here is an adaptation of what I have: Any help is appreciated.
choice = input("Enter Choice 1,2 or 3:") if choice == 1: print "Your Choice is 1" elif choice == 2: print "Your Choice is 2" elif choice == 3: print "Your Choice is 3" elif choice > 3 or choice < 1: print "Invalid Option, you needed to type a 1, 2 or 3...."
source share