histogramme.py

Created by numworks

Created on March 31, 2020

178 Bytes

Trace un histogramme avec les valeurs de la liste x et les classes [0,5[, [5,10[, [10,12[, [12,14[, [14,16[, [18,20[.


from matplotlib.pyplot import *
x=[12,12,15,16,10,12,13,14,12,13,12,20,10,19,12,9,10,13,16,16,17,6,13,2,10,20,15]
hist(x,[0,5,10,12,14,16,18,20])
grid()
show()