From f7348f3105d41efd96df628ab3f4cb8bbe00462a Mon Sep 17 00:00:00 2001 From: fa9ede96786cccb492af75cd0477e73f Date: Wed, 23 Jul 2025 13:50:00 +0000 Subject: [PATCH] no commit message --- module2/exo1/toy_notebook_fr.ipynb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/module2/exo1/toy_notebook_fr.ipynb b/module2/exo1/toy_notebook_fr.ipynb index eb13182..183e692 100644 --- a/module2/exo1/toy_notebook_fr.ipynb +++ b/module2/exo1/toy_notebook_fr.ipynb @@ -17,7 +17,7 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 43, "metadata": {}, "outputs": [ { @@ -38,12 +38,12 @@ "metadata": {}, "source": [ "## En utilisant la méthode des aiguilles de Buffon\n", - "Mais calculé avec la __méthode__ des [aiguilles de Buffon](https://fr.wikipedia.org/wiki/Aiguille_de_Buffon), on obtiendrait comme __approximation__ :" + "Mais calculé avec la __méthode__ des [aiguilles de Buffon](https://fr.wikipedia.org/wiki/Aiguille_de_Buffon), on obtiendrait comme __approximation__ :\n" ] }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 44, "metadata": {}, "outputs": [ { @@ -52,7 +52,7 @@ "3.128911138923655" ] }, - "execution_count": 34, + "execution_count": 44, "metadata": {}, "output_type": "execute_result" } @@ -60,9 +60,9 @@ "source": [ "import numpy as np\n", "np.random.seed(seed=42)\n", - "N=10000\n", - "x = np.random.uniform(size=N, low =0, high=1)\n", - "theta = np.random.uniform(size=N, low=0, high=np.pi/2)\n", + "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)" ] }, @@ -76,7 +76,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 45, "metadata": {}, "outputs": [ { @@ -93,7 +93,7 @@ } ], "source": [ - " %matplotlib inline\n", + "%matplotlib inline\n", "import matplotlib.pyplot as plt\n", "np.random.seed(seed=42)\n", "N = 1000\n", @@ -116,7 +116,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 42, "metadata": {}, "outputs": [ { @@ -125,7 +125,7 @@ "3.112" ] }, - "execution_count": 37, + "execution_count": 42, "metadata": {}, "output_type": "execute_result" } -- 2.18.1