Using np.random.randint

Question Q6.7.1

Explain the difference between

In [x]: a = np.array([6,6,6,7,7,7,7,7,7])
In [x]: a[np.random.randint(len(a), size=5)]
array([7, 7, 7, 6, 7])      # (for example)

and

In [x]: np.random.randint(6, 8, 5)
array([6, 6, 7, 7, 7])      # (for example)

Solution Q6.7.1