Skip to main content

Random Module

The random module can be imported with the name random and has the following methods:

  • randint(min, max) - Returns a random integer between the two values (inclusive).
  • randGauss(<mean>, <standarddev>) - Returns a random number fitting a Gaussian, or normal, distribution. If a mean argument isn't passed, it sets the mean to 0. If a standard deviation argument isn't passed, it sets the standard deviation to 1.
  • random(<min, max>) - Returns a random decimal between the two values (inclusive). If no arguments are passed, then its between 0 and 1.