31.27K
Категория: ПрограммированиеПрограммирование

Random

1.

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

2.

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

3.

uniform
Get a random number in the range [a, b) or [a, b] depending on rounding.
The mean (expected value) and variance of the random variable
are:
E[X] = (a + b) / 2
Var[X] = (b - a) ** 2 / 12

4.

choice
Choose a random element from a non-empty sequence.

5.

shuffle
Shuffle list x in place, and return None.
English     Русский Правила