Skip to content
Snippets Groups Projects
Select Git revision
  • c8ecdd9e7aadb79f850cfd5d60a599fb17ea3152
  • main default protected
2 results

TD2 Deep Learning.ipynb

Blame
  • Forked from Dellandrea Emmanuel / MOD_4_6-TD2
    Source project has a limited visibility.
    tirage-gaussienne.py 557 B
    from math import *
    from random import *
    
    def tirage_gauss_centre_reduit():
        x=uniform(0,1)
        y=sqrt(-2*log(uniform(0,1)))
        y = y*cos(x*2*pi)
        return y 
     
    try :
      n=int(input("combien de valeurs : "))
      for i in range(n) :
        print("Le tirage : ", tirage_gauss_centre_reduit())
    except ValueError as err :
      print("Error: {0}".format(err))    
    
    """ TRACE :
    combien de valeurs : 5
    Le tirage :  0.1675459650607427
    Le tirage :  -0.8810297798592189
    Le tirage :  0.4764601603767129
    Le tirage :  -1.8446292482050937
    Le tirage :  -0.35483078367598453
    """