random number generator

Code that produces unpredictable-looking numbers or choices, such as Python's random module.

In more detail

Python's random module is pseudo-random: it computes its sequence from a seed. Code that accepts a generator as an argument can be tested with a tiny object whose choice method returns a known value.

Related terms

Taught in

References