Computer >> Computer tutorials >  >> Programming >> Python

What is random.uniform method in Python?


The uniform() function is defined in the random module of the standard Python library. It returns a random floating-point number between a given range of numbers

>>> import random
>>> random.uniform(10,100)
20.118467024396452
>>> random.uniform(10,100)
23.739576765885502