Random number

Random number is generated using a python built-in module i. e. random.random function of random module generate a random floating point number and rand-int  function generate a random number between the given interval.

import random

print("Enter two numbers between them we wants to genrate a number:")
num1=int(input())
num2=int(input())

rnum=random.randint(num1,num2)
print(rnum)

 

%d bloggers like this: