from random import randint
from matplotlib.pyplot import axis, plot, show, axhline

L = [] # liste des fréquences
delta = 1/10 # 1/sqrt(100)
p = 1/6 # probabilité d'obtenir la face "1"

for _ in range(200):
    n = 0
    for _ in range(100):
        face = randint(1, 6)
        if face == 1: # si face est "1"
            n = n + 1

    L.append(n/100)

axis([0,200,0,0.5])
plot(L, marker='+', linestyle='')
axhline(y=p-delta, color='r', linestyle='--')
axhline(y=p+delta, color='r', linestyle='--')
show()
