⌨️ap computer science principles review

RANDOM(a, b)

Written by the Fiveable Content Team • Last updated September 2025
Verified for the 2026 exam
Verified for the 2026 examWritten 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).

"RANDOM(a, b)" also found in: