# Generate a few random numbers for a uniformity test import numpy as np import matplotlib.pyplot as plt import random # By default, the system time is used as a seed number = 100 x = np.zeros(number, dtype=int) count = np.zeros(10, dtype=int) for i in range(number): x[i] = random.randint(0, 9) count[x[i]] += 1 for i in range(10): print (f"Count of integer {i} is {count[i]}") plt.hist(x, bins=10) plt.xlabel( 'Values' ) plt.ylabel( 'Frequency' ) plt.show()