# Functions go here def int_check(question, low, high): """Checks users enter an integer between two values""" error = f"Oops - please enter an integer between {low} and {high}." while True: try: # Change the response to an integer and check that it's more than zero response = int(input(question)) if low <= response <= high: return response else: print(error) except ValueError: print(error) # Main Routine goes here # loop for testing purposes... while True: print() # ask user for an integer pizza_choice = int_check("Choose a pizza from the menu (1-10): ", 1, 10) # Output error message / success message if pizza_choice == 1: print(f"You chose Classic Cheese") continue elif pizza_choice == 2: print(f"You chose Pepperoni") continue elif pizza_choice == 3: print(f"You chose Vegetarian") continue elif pizza_choice == 4: print(f"You chose Meat Lovers") continue elif pizza_choice == 5: print(f"You chose Hawaiian") continue elif pizza_choice == 6: print(f"You chose BBQ Chicken") continue elif pizza_choice == 7: print(f"You chose Ham and Cheese") continue elif pizza_choice == 8: print(f"You chose Buffalo Chicken") continue elif pizza_choice == 9: print(f"You chose Supreme") continue else: print(f"You chose Pesto")