# This program is improved from V1 by passing different parameters to the in_check function (low and high values) # functions go here def int_check(low, high): """Checks if users intger input is less or equal to 13.""" error = f"please input and integer (whole number) less than/equal to {low} and {high}. " while True: try: response = int(input('What is the game goal?')) if response <= high and response >= low: return response else: print(error) except ValueError: print(error) # main routine starts here game_goal = int_check(1, 10) second_goal = int_check(5, 20) print(f" First goal is {game_goal} second goal is {second_goal}")