From caff4d32388d338a21bc4ae0117199045445867b Mon Sep 17 00:00:00 2001 From: 9f8ada2c29b8f833ac8af73a374f9b02 <9f8ada2c29b8f833ac8af73a374f9b02@app-learninglab.inria.fr> Date: Fri, 15 Oct 2021 17:18:33 +0000 Subject: [PATCH] added last approx --- module2/exo1/toy_notebook_fr.ipynb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/module2/exo1/toy_notebook_fr.ipynb b/module2/exo1/toy_notebook_fr.ipynb index 152e7c3..54b4b10 100644 --- a/module2/exo1/toy_notebook_fr.ipynb +++ b/module2/exo1/toy_notebook_fr.ipynb @@ -110,6 +110,26 @@ "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": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "3.112" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "4*np.mean(accept)" + ] } ], "metadata": { -- 2.18.1