Numeros de paragraphe générés automatiquement

parent 20397383
...@@ -4,14 +4,14 @@ ...@@ -4,14 +4,14 @@
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"# 1 À propos du calcul de π" "# À propos du calcul de π"
] ]
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"## 1.1 En demandant à la lib maths" "## En demandant à la lib maths"
] ]
}, },
{ {
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 3, "execution_count": 9,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"## 1.2 En utilisant la méthode des aiguilles de Buffon" "## En utilisant la méthode des aiguilles de Buffon"
] ]
}, },
{ {
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 6, "execution_count": 10,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
"3.128911138923655" "3.128911138923655"
] ]
}, },
"execution_count": 6, "execution_count": 10,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"## 1.3 Avec un argument \"fréquentiel\" de surface" "## Avec un argument \"fréquentiel\" de surface"
] ]
}, },
{ {
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 7, "execution_count": 11,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
"N = 1000\n", "N = 1000\n",
"x = np.random.uniform(size=N, low=0, high=1)\n", "x = np.random.uniform(size=N, low=0, high=1)\n",
"y = np.random.uniform(size=N, low=0, high=1)\n", "y = np.random.uniform(size=N, low=0, high=1)\n",
"1\n", "\n",
"accept = (x*x+y*y) <= 1\n", "accept = (x*x+y*y) <= 1\n",
"reject = np.logical_not(accept)\n", "reject = np.logical_not(accept)\n",
"fig, ax = plt.subplots(1)\n", "fig, ax = plt.subplots(1)\n",
...@@ -131,12 +131,12 @@ ...@@ -131,12 +131,12 @@
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"Il est alors aisé d’obtenir une approximation (pas terrible) de π 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 :"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 8, "execution_count": 12,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
"3.112" "3.112"
] ]
}, },
"execution_count": 8, "execution_count": 12,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -153,6 +153,13 @@ ...@@ -153,6 +153,13 @@
"source": [ "source": [
"4*np.mean(accept)" "4*np.mean(accept)"
] ]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
} }
], ],
"metadata": { "metadata": {
......
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