This module is based upon the random
module in the Python standard library. It contains functions for generating random behaviour.
To access this module you need to:
We assume you have done this for the examples below.
FunctionsReturns an integer with n
random bits.
Warning
Because the underlying generator function returns at most 30 bits, n
may only be a value between 1-30 (inclusive).
Initialize the random number generator with a known integer n
. This will give you reproducibly deterministic randomness from a given starting state (n
).
Return a random integer N
such that a <= N <= b
. Alias for randrange(a, b+1)
.
Return a randomly selected integer between zero and up to (but not including) stop
.
Return a randomly selected integer from range(start, stop)
.
Return a randomly selected element from range(start, stop, step)
.
Return a random element from the non-empty sequence seq
. If seq
is empty, raises IndexError
.
Return the next random floating point number in the range [0.0, 1.0)
Return a random floating point number N
such that a <= N <= b
for a <= b
and b <= N <= a
for b < a
.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4