What it does

a simple example of a random number generator in Python without using any built-in random functions. This is a basic implementation of the Linear Congruential Generator (LCG) algorithm, which is a simple and widely used method for generating pseudo-random numbers.

What we learned

Random number Generator class has an _generate_next method that implements the LCG algorithm. The random method calls _generate_next and normalizes the result to produce a random floating-point number in the range [0, 1].

Built With

Share this project:

Updates