Слайд 2Choice
Choose a random element from a non-empty sequence.
![Choice Choose a random element from a non-empty sequence.](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/1113214/slide-1.jpg)
Слайд 3Choices
Return a k sized list of population elements chosen with replacement.
If
![Choices Return a k sized list of population elements chosen with replacement.](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/1113214/slide-2.jpg)
the relative weights or cumulative weights are not specified,
the selections are made with equal probability.
Слайд 4Randint
Return random integer in range [a, b], including both end points.
![Randint Return random integer in range [a, b], including both end points.](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/1113214/slide-3.jpg)
Слайд 5Randrange
Choose a random item from range(start, stop[, step]).
This fixes the problem
![Randrange Choose a random item from range(start, stop[, step]). This fixes the](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/1113214/slide-4.jpg)
with randint() which includes the
endpoint; in Python this is usually not what you want.
Слайд 6Random
random() -> x in the interval [0, 1).
![Random random() -> x in the interval [0, 1).](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/1113214/slide-5.jpg)