⌨️ap computer science principles review

Random.randint

Written by the Fiveable Content Team • Last updated August 2025
Verified for the 2026 exam
Verified for the 2026 examWritten by the Fiveable Content Team • Last updated August 2025

Definition

random.randint is a function in Python that generates random integers within a specified range. It takes two arguments - the lowest possible value and the highest possible value - and returns a randomly chosen integer between them.

"Random.randint" also found in:

2,589 studying →