-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Hands-On Simulation Modeling with Python
By :
So far, we have seen what methods can be used for generating random numbers. We have also proposed some solutions in Python code for the generation of random numbers through some universally used methods. These applications have been useful for understanding the basis on which random number generators have been made. In Python, there is a specific module for the generation of random numbers: this is the random module. Let's examine what it is.
The random module implements PRNGs for various distributions. The random module is based on the Mersenne Twister algorithm, which was originally developed to produce inputs for Monte Carlo simulations. The Mersenne Twister algorithm is a PRNG that produces almost uniform numbers suitable for a wide range of applications.
It is important to note that random numbers are generated using repeatable and predictable deterministic algorithms. They begin with a certain...