from math import *
from random import *

def X():
    if random()<=2/3:
        rep=1
    else:
        rep=0
    return rep

def Moyenne():
    somme=0
    for k in range(100):
        somme=somme+X()
    m=somme/100
    return m

def Distance():
    e=2/3
    m=Moyenne()
    d=abs(m-e)
    return d

def Répétition():
    s=0.47
    r=0
    for j in range (100):
        d=Distance()
        if d<2*s/10:
            r=r+1
    p=r/100
    return p


