print("Integer checker started") def int_check(question): while True: try: answer = int(input(question)) if answer >= 5 and answer <= 15: return answer else: print("Please enter a number between 5 and 15.") except ValueError: print("Please enter a whole number.") # Testing the function amount_questions = int_check( "How many questions would you like? (5-15): " ) print("You chose:", amount_questions)