Given a range of a min_year and a max_year, raise an exception if value entered is not an integer, OR the value does not fall in the specified range (in this case 1959-2007)
Here's what I've tried (close, but no cigar)
---------------------------------------------------
Here's what I've tried (close, but no cigar)
---------------------------------------------------
min_year=1959 max_year=2007 display_string = "What Year? (" + str(min_year) + "-" + str(max_year) + ")" while True: try: requested_year = int(input(display_string)) requested_year >= min_year and requested_year <= max_year except: print ("Invalid input or value out-of-range... Please re-try") else: break print("Continue Code Execution")