From 4b4ddf397433638ca8dd28d1a1d0130a15c93c11 Mon Sep 17 00:00:00 2001 From: 5ac7b5106063733377ff068eed2a62e3 <5ac7b5106063733377ff068eed2a62e3@app-learninglab.inria.fr> Date: Wed, 23 Dec 2020 14:41:43 +0000 Subject: [PATCH] no commit message --- module2/exo1/toy_notebook_fr.ipynb | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/module2/exo1/toy_notebook_fr.ipynb b/module2/exo1/toy_notebook_fr.ipynb index b53a832..dba4cc2 100644 --- a/module2/exo1/toy_notebook_fr.ipynb +++ b/module2/exo1/toy_notebook_fr.ipynb @@ -114,12 +114,32 @@ "ax.set_aspect('equal')" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "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 :" + ] + }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": {}, - "outputs": [], - "source": [] + "outputs": [ + { + "data": { + "text/plain": [ + "3.112" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "4*np.mean(accept)" + ] } ], "metadata": { -- 2.18.1