from math import *
from random import *

def Distance(n):
    somme=0
    for k in range(n):
        a=randint(-2,2)
        x=a**2
        somme=somme+x
    m=somme/n
    d=abs(m-2)
    return d

def Répétition(N,n):
    s=sqrt(2.8)
    r=0
    for j in range(N):
        if Distance(n)<=2*s/sqrt(n):
            r=r+1
    p=r/N
    return p


