From 884a7968a186ea5b4d2d7393ac4378a72ef038fa Mon Sep 17 00:00:00 2001 From: 3f507dea2f470ad79193bc64530085d1 <3f507dea2f470ad79193bc64530085d1@app-learninglab.inria.fr> Date: Wed, 26 Mar 2025 10:45:09 +0000 Subject: [PATCH] update --- module2/exo1/toy_notebook_fr.ipynb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/module2/exo1/toy_notebook_fr.ipynb b/module2/exo1/toy_notebook_fr.ipynb index b8c42be..ab112f6 100644 --- a/module2/exo1/toy_notebook_fr.ipynb +++ b/module2/exo1/toy_notebook_fr.ipynb @@ -7,8 +7,7 @@ "# À propos du calcul de $\\pi$\n", "\n", "## En demandant à la lib maths\n", - "\n", - "Mon ordinateur m’indique que $\\pi$ vaut approximative" + "Mon ordinateur m’indique que $\\pi$ vaut *approximative*" ] }, { @@ -26,7 +25,7 @@ ], "source": [ "from math import *\n", - "print(pi)\n" + "print(pi)" ] }, { @@ -34,13 +33,12 @@ "metadata": {}, "source": [ "## En utilisant la méthode des aiguilles de Buffon\n", - "\n", "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": 12, + "execution_count": 21, "metadata": {}, "outputs": [ { @@ -49,7 +47,7 @@ "3.128911138923655" ] }, - "execution_count": 12, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -100,7 +98,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", - "1\n", + "\n", "accept = (x*x+y*y) <= 1\n", "reject = np.logical_not(accept)\n", "fig, ax = plt.subplots(1)\n", -- 2.18.1