#input_int.py #Function to ensure an integer is input. def input_int(prompt): '''Ensure an integer is input. Parameter is customized prompt. Return the int''' while True: try: int_var = int(input(prompt)) except ValueError: print(" Not an integer. Try again") else: return int_var #test: i = input_int("this would be the prompt that you want to use: ") print("i=", i) age = input_int("Please enter your age in years: ") print("Your entered age is",age)