Python Developer Question:
Download Job Interview Questions and Answers PDF
How to generate random numbers in Python?
Answer:
To generate random numbers in Python, you need to import command as
import random
random.random()
This returns a random floating point number in the range [0,1)
import random
random.random()
This returns a random floating point number in the range [0,1)
Download Python Developer Interview Questions And Answers
PDF