-----Please generate a random float where the value is between 10 and 100 using Python math module. | Sololearn: Learn to code for FREE!

+1

-----Please generate a random float where the value is between 10 and 100 using Python math module.

4/30/2019 1:13:50 AM

Yubraj Jung Thapa

4 Answers

New Answer

+6

I don't know how to generate random number using math module in python & also if it's possible or not. I just found this way. from random import uniform as randFloat print(randFloat(10,100))

+6

I can't imagine what you need this for, but: from random import random print(90*random()+10)

+3

+1

import random var1 = random.uniform(100,10) https://docs.python.org/3/library/random.html