Professional Documents
Culture Documents
The “random” 1.
2.
choice()
randrange()
Library 3.
4.
random()
seed()
5. shuffle()
Functions 6. uniform()
random.choice(container)
- Generates 1 number
from a container
- Ex:
random.randrange(1,6)
will choose a random
number from 1-5
random.random()
- Generates a floating
point number less than 1
and greater than or equal
to 0 [0, 1)
random.seed(seed_argument)
Maps a particular random number
with the seed argument
random.shuffle(list)