Update toy_document_orgmode_python_en.org

parent afbb411c
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment