diff --git a/module2/exo1/Hossie_notebook_fr.ipynb b/module2/exo1/Hossie_notebook_fr.ipynb index feb0994aa6ec4276d1ee1e4f96e8fe48f4de019c..0c9fdc03e0b295b49d10873da58ad51ca0b1b024 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,