diff --git a/module2/exo1/toy_document_orgmode_python_fr.org b/module2/exo1/toy_document_orgmode_python_fr.org index d36b359265f80359300b59c7f42788693ae75c07..04d6fec86fa5d2ed955556387ae5be0358db5a5d 100644 --- a/module2/exo1/toy_document_orgmode_python_fr.org +++ b/module2/exo1/toy_document_orgmode_python_fr.org @@ -12,17 +12,19 @@ * En demandant à la lib maths Mon ordinateur m'indique que $\pi$ vaut /approximativement/ : -#+begin_src python :results output :session :exports both +#+begin_src python :results value :session :exports both from math import * pi #+end_src #+RESULTS: +: 3.141592653589793 * En utilisant la méthode des aiguilles de Buffon + SCHEDULED: <2020-04-24 Ven> Mais calculé avec la *méthode* des [[https://fr.wikipedia.org/wiki/Aiguille_de_Buffon][aiguilles de Buffon]], on obtiendrait comme *approximation* : -#+begin_src python :results output :session :exports both +#+begin_src python :results value :session :exports both import numpy as np np.random.seed(seed=42) N = 10000 @@ -32,6 +34,7 @@ theta = np.random.uniform(size=N, low=0, high=pi/2) #+end_src #+RESULTS: +: 3.128911138923655 * Avec un argument "fréquentiel" de surface Sinon une méthode plus simple à comprendre et ne faisant pas