Random Number Functions

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/4

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 4:11 AM on 9/23/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

5 Terms

1
New cards

random.randrange(start, stop, step)

Return a randomly selected element from range(start, stop, step). Note stop is excluded from the range.

2
New cards

random.randint(a, b)

Return a random integer N such that a <= N <= b

3
New cards

random.choice(seq)

Return a random element from the non-empty sequence seq.

4
New cards

random.sample(population, k)

Return a k-length list of elements chosen from the population sequence. Used for random

sampling without replacement.

5
New cards

random.random()

Return a random floating-point number in the range [0.0, 1.0]