#Checks that users enter an integer def int_check(): while True: error = "Please enter an integer that is 1, 2, or 3" try: my_num = int(input("Enter an integer: ")) # checks that the number is 1, 2, or 3 if my_num < 1 or my_num > 3: print(error) else: print("Your number is", my_num) except ValueError: print(error) # main routine goes here target_score = int_check() print(target_score)