Styrow.dev
Question 30 of 45
Python Topic: General medium

Explain how can you generate random numbers in Python?

Question

Explain how can you 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)


šŸ“² Practice Offline on Mobile: Download the free QA Automation & SDET Prep app on Google Play & App Store.