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