Random Numbers

In this lesson, we will learn about generating random numbers and how to choose random numbers from a set of numbers.

Generating random numbers #

A random number generator lets you draw a random number from a specified distribution. Several random number generators are included in the random subpackage of numpy. We will import this package as rnd to save some typing.

import numpy.random as rnd

One of the examples for random number generators is the randint() function. The randint(low, high, size) function returns an array ...