Atom

random module

Generate reproducible random values, pick items, or shuffle collections.

Import it with 'use random'.

Atom
use random
print(random.int(7, 8))
Output
7

Requires ATOM_WITH_RANDOM. The module starts with seed 42 and stream 54 in each VM. Operations advance a deterministic PCG generator. Use crypto.random for cryptographically secure bytes. A generator dictionary also exposes seed, int, float, pick and shuffle with the same calling conventions.

Functions