From bf7cb243b41ae3078e0e2b098b5939586288df8c Mon Sep 17 00:00:00 2001 From: 28e1f4de90ce29a7aec6f2ae83fdfffc <28e1f4de90ce29a7aec6f2ae83fdfffc@app-learninglab.inria.fr> Date: Wed, 13 Aug 2025 12:01:00 +0000 Subject: [PATCH] 2nd correction --- module2/exo1/toy_notebook_fr.ipynb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/module2/exo1/toy_notebook_fr.ipynb b/module2/exo1/toy_notebook_fr.ipynb index bfb5ce8..71d7021 100644 --- a/module2/exo1/toy_notebook_fr.ipynb +++ b/module2/exo1/toy_notebook_fr.ipynb @@ -29,7 +29,13 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## En demandant à la lib maths\n", + "## En demandant à la lib maths" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "Mon ordinateur m’indique que $\\pi$ vaut *approximativement*" ] }, @@ -89,7 +95,7 @@ "metadata": {}, "source": [ "## Avec un argument \"fréquentiel\" de surface\n", - "Sinon, une méthode plus simple à comprendre et ne faisant pas intervenir d’appel à la fonction sinus se base sur le fait que si X ∼ U(0, 1) et Y ∼ U(0, 1) alors $P[X^2 + Y^2 ≤ 1] = \\pi/4$ (voir méthode de [Monte Carlo](https://fr.wikipedia.org/wiki/M%C3%A9thode_de_Monte-Carlo#D%C3%A9termination_de_la_valeur_de_%CF%80) sur Wikipedia). Le code suivant illustre ce fait :" + "Sinon, une méthode plus simple à comprendre et ne faisant pas intervenir d’appel à la fonction sinus se base sur le fait que si $X\\sim U(0,1)$ et $Y\\sim U(0,1)$ alors $P[X^2 + Y^2\\leq 1] = \\pi/4$ (voir méthode de [Monte Carlo](https://fr.wikipedia.org/wiki/M%C3%A9thode_de_Monte-Carlo#D%C3%A9termination_de_la_valeur_de_%CF%80) sur Wikipedia). Le code suivant illustre ce fait :" ] }, { @@ -111,8 +117,9 @@ } ], "source": [ - "%matplotlib inline\n", + "%matplotlib inline \n", "import matplotlib.pyplot as plt\n", + "\n", "np.random.seed(seed=42)\n", "N = 1000\n", "x = np.random.uniform(size=N, low=0, high=1)\n", -- 2.18.1