From 2f558eee0ac9cf08944308015d6f9c5ea8195131 Mon Sep 17 00:00:00 2001 From: 8388c1425d3a684d1ec014af187ba020 <8388c1425d3a684d1ec014af187ba020@app-learninglab.inria.fr> Date: Tue, 24 Mar 2020 12:08:54 +0000 Subject: [PATCH] Update toy_document_orgmode_python_en.org --- module2/exo1/toy_document_orgmode_python_en.org | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/module2/exo1/toy_document_orgmode_python_en.org b/module2/exo1/toy_document_orgmode_python_en.org index 058e29b..a7082ea 100644 --- a/module2/exo1/toy_document_orgmode_python_en.org +++ b/module2/exo1/toy_document_orgmode_python_en.org @@ -24,8 +24,6 @@ from math import * pi #+end_src -#+RESULTS: - * 2. *Buffon's needle Applying the method of [[https://en.wikipedia.org/wiki/Buffon%27s_needle_problem][_Buffon's needle_]], we get the *approximation* #+begin_src python :results output :exports both @@ -37,7 +35,7 @@ theta=np.random.uniform(size=N, low=0, high = pi/2) 2/(sum((x+np.sin(theta))>1)/N) #+end_src -#+RESULTS: + * 3. Using a surface fraction argument A method that is easier to understand and does not make use of the sin @@ -65,7 +63,7 @@ plt.savefig(matplot_lib_filename) print(matplot_lib_filename) #+end_src -#+RESULTS: + It is then straightforward to obtain a (not really good) approximation of \pi by counting how many time, on average, $X^2$ + $^{}Y^2$ is smaller -- 2.18.1