diff --git a/module2/exo1/toy_notebook_fr.ipynb b/module2/exo1/toy_notebook_fr.ipynb index adf8b9cfee9f1fa89b88a4bab17d458c6d7284ec..b5997ec6836f645a4c005a64fff46d2d5773139f 100644 --- a/module2/exo1/toy_notebook_fr.ipynb +++ b/module2/exo1/toy_notebook_fr.ipynb @@ -53,14 +53,11 @@ }, "outputs": [ { - "data": { - "text/plain": [ - "3.128911138923655" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" + "name": "stdout", + "output_type": "stream", + "text": [ + "3.1289111389236548\n" + ] } ], "source": [ @@ -69,7 +66,8 @@ "N = 10000\n", "x = np.random.uniform(size=N, low=0, high=1)\n", "theta = np.random.uniform(size=N, low=0, high=pi/2)\n", - "2/(sum((x+np.sin(theta))>1)/N)" + "approx = 2/(sum((x+np.sin(theta))>1)/N)\n", + "print(f\"{approx:.16f}\")" ] }, {