Corrections typos et code

parent 68b08f6c
...@@ -4,9 +4,15 @@ ...@@ -4,9 +4,15 @@
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"# À propos du calcul de $\\pi$\n", "# À propos du calcul de $\\pi$\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## En demandant à la lib maths\n", "## En demandant à la lib maths\n",
"Mon ordinateur m'indique que $\\pi$ vaut *approximativement*" "Mon ordinateur m'indique que $\\pi$ vaut _approximativement_"
] ]
}, },
{ {
...@@ -32,7 +38,7 @@ ...@@ -32,7 +38,7 @@
"metadata": {}, "metadata": {},
"source": [ "source": [
"## En utilisant la méthode des aiguilles de Buffon\n", "## En utilisant la méthode des aiguilles de Buffon\n",
"Mais calculé avec la **méthode** des [aiguilles de Buffon](https://fr.wikipedia.org/wiki/Aiguille_de_Buffon), on obtiendrait comme **approximation** :" "Mais calculé avec la __méthode__ des [aiguilles de Buffon](https://fr.wikipedia.org/wiki/Aiguille_de_Buffon), on obtiendrait comme __approximation__ :"
] ]
}, },
{ {
...@@ -43,7 +49,7 @@ ...@@ -43,7 +49,7 @@
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"3.128911138923655e-08" "3.128911138923655"
] ]
}, },
"execution_count": 2, "execution_count": 2,
...@@ -57,7 +63,7 @@ ...@@ -57,7 +63,7 @@
"N = 10000\n", "N = 10000\n",
"x = np.random.uniform(size=N, low=0, high=1)\n", "x = np.random.uniform(size=N, low=0, high=1)\n",
"theta = np.random.uniform(size=N, low=0, high=pi/2)\n", "theta = np.random.uniform(size=N, low=0, high=pi/2)\n",
"2/sum((x+np.sin(theta))>1)/N" "2/(sum((x+np.sin(theta))>1)/N)"
] ]
}, },
{ {
...@@ -107,7 +113,7 @@ ...@@ -107,7 +113,7 @@
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"Il est alors aisé d'obtenir une approximation (pas terrible) de $\\pi$ en comptant combien de fois, en moyenne, $X^2 + Y^2$ est inférieur à $1$ : " "Il est alors aisé d'obtenir une approximation (pas terrible) de $\\pi$ en comptant combien de fois, en moyenne, $X^2 + Y^2$ est inférieur à 1 : "
] ]
}, },
{ {
......
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