I write a code that generates a random number between (0, 10) 100000 time and plot it, I expect the histogram to be flat but this what I got
import random
import numpy as np
import matplotlib.pyplot as plt
numbers = []
for i in range(10000000):
numbers.append(random.randint(0, 10))
plt.hist(numbers)
Aucun commentaire:
Enregistrer un commentaire