

# https://www.globalsino.com/ICs/
# Wait for random time of a time frame between two retries



from retrying import retry
from random import randint

# time unit is "ms below": 1 ms to 0.001 s
@retry (wait_random_min=1000, wait_random_max=9000)

def RandomNumber():
    int_r = int(input("Please enter an integer: "))
    if int_r > 0:        
        # print(f"The random number is equal to: {int_r}")
        raise IOError("The input number is greater than 0")
    else:
        return int_r

try :
    print(f"The input number is equal to: {RandomNumber()}") 
     
except OSError as error :
    print(error)
    print("File descriptor does not associate with any terminal device")

