Random Menu
Note: When creating a new program that uses this module, it is recommended to use the Random Simulations program type. This will ensure that all the relevant modules are imported.
Item |
Description |
---|---|
from random import * |
Imports all methods from the random module. |
random() |
Returns a floating point number from 0 to 1.0. |
uniform(min,max) |
Returns a random number x (float) such that min <= x <= max. |
randint(min,max) |
Returns a random integer between min and max. |
choice(sequence) |
Returns a random element from a non-empty sequence. |
randrange(start,stop,step) |
Returns a random number from start to stop by step. |
seed() |
Initializes random number generator. |