Perform an action if N is within a pre-determined range

I have a number generator/counter that will output increasingly higher values ranging from 1 to 1,000. Once it reaches 1,000, the count is reset and restarts. The total numbers generated between 1–1,000 is variable and random. The delta between numbers is variable and random. Example: 1, 45, 120, 300, 590, 700, 750, 967 3, 4,… Read More Perform an action if N is within a pre-determined range

How to take a user input of 24 hour time in HHMM format? (without importing any modules)

I need to accept a user input for time, between 0000 and 2359, without importing any modules. I currently have it just taking an int input: fillTime = "X" while fillTime == "X": try: fillTime = int(input("Enter the time (0000-2359): ")) if fillTime < 0 or fillTime > 2359: print("Error! Please enter a valid time!")… Read More How to take a user input of 24 hour time in HHMM format? (without importing any modules)