# checks for an integer from 5 to 15 def int_check(to_check): while True: error = "Please enter an integer from 5 - 15: " try: response = int(to_check) # checks that the number is from the range of 5 - 15 if 5 <= response <= 15: print(error) return response else: return response except ValueError: print(error) return response # Automated testing is below in the form (test_case, expected_value) to_test = [ (4,4), (5,5), (6,6), (7,7), (8,8), (9,9), (10,10), (16,16), ] # run tests! for item in to_test: # retrieve test case and expected value case = item[0] expected = item[1] # get actual value (ie: test ticket function) actual = int_check(case) # compare actual and expected and output pass / fail if actual == expected: print(f" ✅✅✅Passed! Case: {case}, expected: {expected}, received: {actual} ✅✅✅") else: print(f"❌❌❌ Failed! Case: {case}, expected: {expected}, received: {actual} ❌❌❌")