Похожие презентации:
Choose a random element from a non-empty sequence
1.
Методы модуля Random6 самых важных для решения
домашних задач
2.
Choice : Choose a random elementfrom a non-empty sequence.
3.
If the relative weights orcumulative weights are not
specified,
the selections are made with
equal probability.
4.
Randint : Return random integer inrange [a, b], including both end
points.
5.
This fixes the problem withrandint() which includes the
endpoint; in Python this is
usually not what you want.
6.
Random : random() -> x in theinterval [0, 1).
7.
into grand prize and secondplace winners (the subslices).
Members of the population
need not be hashable or unique. If
the
population contains repeats,
then each occurrence is a possible
selection in the sample.