From f0115cbfa1784ed93a96e597d052caad5a43ff92 Mon Sep 17 00:00:00 2001 From: a12707740afaaa5fb65905502cc0ab13 Date: Mon, 30 Oct 2023 10:34:17 +0000 Subject: [PATCH] no commit message --- module2/exo1/toy_notebook_fr.ipynb | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/module2/exo1/toy_notebook_fr.ipynb b/module2/exo1/toy_notebook_fr.ipynb index 9626174..174a781 100644 --- a/module2/exo1/toy_notebook_fr.ipynb +++ b/module2/exo1/toy_notebook_fr.ipynb @@ -17,7 +17,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 14, "metadata": {}, "outputs": [ { @@ -43,7 +43,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 15, "metadata": {}, "outputs": [ { @@ -52,7 +52,7 @@ "3.128911138923655" ] }, - "execution_count": 11, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } @@ -76,7 +76,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 16, "metadata": {}, "outputs": [ { @@ -100,6 +100,7 @@ "N = 1000\n", "x = np.random.uniform(size=N, low=0, high=1)\n", "y = np.random.uniform(size=N, low=0, high=1)\n", + "\n", "accept = (x*x+y*y) <= 1\n", "reject = np.logical_not(accept)\n", "\n", @@ -113,12 +114,12 @@ "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 :" + "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": 13, + "execution_count": 17, "metadata": {}, "outputs": [ { @@ -127,7 +128,7 @@ "3.112" ] }, - "execution_count": 13, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } -- 2.18.1