Written by the Fiveable Content Team • Last updated September 2025
Verified for the 2026 exam
Verified for the 2026 exam•Written by the Fiveable Content Team • Last updated September 2025
Definition
RANDOM(a, b) is a Python function that generates a random number between the values of 'a' and 'b', where 'a' is the lower bound (inclusive) and 'b' is the upper bound (exclusive).
Related terms
random module: The random module in Python provides functions for generating random numbers, including RANDOM(a, b).
randint(): The randint() function is another way to generate random integers in Python. It takes two arguments specifying the range.
uniform(): The uniform() function generates a random floating-point number between two specified values.