To generate a random, we use a random module of python. Here are some examples To generate a floating-point number from 0-1
import random
n = random.random()
print(n)
To generate a integer between a certain range (say from a to b):
import random
n = random.randint(a,b)
print(n)
Great Learning offers extensive courses on Artificial Intelligence and Machine Learning. Upskilling in this domain can land you the job of your dreams.