partie2_ex59_1.py

Created by cahier-indice-algo-1techno

Created on April 22, 2022

262 Bytes


from random import randint

def simule():
    test = randint(1, 250)
    if test == 1:
        return 1
    else:
        return 0

def echantillon():
    ech = 0
    for k in range(1000):
        ech = ech + simule()
    return ech / 1000