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


Updated on: 24-Jun-2020

110 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements