Choose a random element from a non-empty sequence

Слайд 2

Choice : Choose a random element from a non-empty sequence.

Choice : Choose a random element from a non-empty sequence.

Слайд 3

Choices : Return a k sized list of population elements chosen with

Choices : Return a k sized list of population elements chosen with
replacement.
If the relative weights or cumulative weights are not specified,
the selections are made with equal probability.

Слайд 4

Randint : Return random integer in range [a, b], including both end

Randint : Return random integer in range [a, b], including both end points.
points.

Слайд 5

Randrange : Choose a random item from range(start, stop[, step]).
This fixes

Randrange : Choose a random item from range(start, stop[, step]). This fixes
the problem with randint() which includes the
endpoint; in Python this is usually not what you want.

Слайд 6

Random : random() -> x in the interval [0, 1).

Random : random() -> x in the interval [0, 1).
Имя файла: Choose-a-random-element-from-a-non-empty-sequence.pptx
Количество просмотров: 25
Количество скачиваний: 0