Home >>Python Random Module >Python Random uniform() Method
Python Random uniform() Method in python is used to returns a random float number between the two specified number, such that x is less than or equal to z and z is less than y.
Syntax:random.uniform(a, b)
Parameter | Description |
---|---|
a | It is Required. To specifying the lowest possible outcome of a number. |
b | It is Required. To specifying the highest possible outcome of a number. |
import random
print(random.uniform(15, 45))
import random
print(random.uniform(22, 37))