Py.–Random

 0    12 フィッシュ    sir
mp3をダウンロードする 印刷 遊びます 自分をチェック
 
質問 答え
A random item from a list, tuple, or string.
学び始める
choice(seq)
A randomly selected element from range(start, stop, step).
学び始める
randrange ([start,] stop [, step])
A random float r: 0<=r<1
学び始める
random()
Sets the integer starting value used in generating random numbers. Call this function before calling any other random module function. Returns None.
学び始める
seed([i'x])
Randomizes the items of a list in place. Returns None.
学び始める
shuffle(lst)
A random float r, belonging to [x; y)
学び始める
uniform(x, y)
Returns a list with a random selection from the given sequence
学び始める
choices(sequence, weights=None, cum_weights=None, k=1)
returns a list with a randomly selection of a specified number of items from a sequnce.
学び始める
sample(sequence, k)
Returns the current internal state of the random number generator
学び始める
getstate()
Returns a number representing the random bits
学び始める
getrandbits()
Get random integer in <start; stop>.
学び始める
randint(start, stop)
setstate (f'state)
学び始める
setstate(f'state)

コメントを投稿するにはログインする必要があります。