def int_checker(): """Checks if an integer is more than or equal to 13""" error = "enter an integer more than or equal to 13" while True: try: response = int(input("What is the game goal?")) if response < 13: print(error) else: return response except ValueError: print(error) #main game_goal = int_checker() print(game_goal)