from math import *
from random import *

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

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

