From dd44c08b99c923b69d769d958641b09767fc17c3 Mon Sep 17 00:00:00 2001 From: 2f4a372b0e9f8e92c5ed07d5719f238b <2f4a372b0e9f8e92c5ed07d5719f238b@app-learninglab.inria.fr> Date: Sun, 11 Dec 2022 13:55:20 +0000 Subject: [PATCH] Hossie Paguiel Javan assignment --- module2/exo1/Hossie_notebook_fr.ipynb | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/module2/exo1/Hossie_notebook_fr.ipynb b/module2/exo1/Hossie_notebook_fr.ipynb index feb0994..0c9fdc0 100644 --- a/module2/exo1/Hossie_notebook_fr.ipynb +++ b/module2/exo1/Hossie_notebook_fr.ipynb @@ -110,6 +110,33 @@ "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": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "3.112" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "4*np.mean(accept)" + ] + }, { "cell_type": "code", "execution_count": null, -- 2.18.1