I need to write the function -
random_number(minimum,maximum)
Without using the random module and I did this:
import time
def
here we need to understand one thing that a random varible is generated by using random values that gives at run time. For that we need time module
time.time() gives you random values (digits count nearly 17). we need in milliseconds so we need to multiply by 1000 if i need the values from 0-10 then we need to get the value less than 10 that means we need below: time.time%10 (but it is in float we need to convert to int) int(time.time%10)
import time
def rand_val(x):
random=int(time.time()*1000)
random %= x
return random
x=int(input())
print(rand_val(x))