From 16b1f83df1d3d3aa664e895ae4f0e7f79ac08eca Mon Sep 17 00:00:00 2001 From: 9baf9c71245fc8049af864354be35c3b <9baf9c71245fc8049af864354be35c3b@app-learninglab.inria.fr> Date: Mon, 15 Apr 2024 11:25:20 +0000 Subject: [PATCH] no commit message --- module2/exo1/toy_notebook_fr.ipynb | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/module2/exo1/toy_notebook_fr.ipynb b/module2/exo1/toy_notebook_fr.ipynb index 959928d..79c0c09 100644 --- a/module2/exo1/toy_notebook_fr.ipynb +++ b/module2/exo1/toy_notebook_fr.ipynb @@ -7,6 +7,40 @@ "# A propos du calcul de $\\pi$\n" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## En demandant à la lib maths\n", + "Mon ordinateur m'indique que $\\pi$ vaut *approximativement*" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "3.141592653589793\n" + ] + } + ], + "source": [ + "from math import *\n", + "print(pi)" + ] + }, + { + "cell_type": "markdown", + "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__ :" + ] + }, { "cell_type": "code", "execution_count": null, -- 2.18.1