Here is the five main functions used for generating random numbers in a Python script.
1. Python random() function:
This function returns a random floating point value between 0 to 1. You can also specify the range to override the defaults.
2. Python randint() function:
The randint() function takes in a range and produces an integer number between the defined range.
3. Python uniform() function:
Just as the randint() function generates an integer within a given range, uniform() does the same for floating point numbers.
4. Python randrange() function:
The randrange() function is used to select a integer value between a defined range. You can also specify to select even or odd number between a range.
5. Python choice() function:
Python choice() function is used to select a single random element from a sequence.