{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# À propos du calcul de $\\pi$\n", "\n", "## En demandant à la lib maths\n", "\n", "Mon ordinateur m’indique que $\\pi$ vaut *approximativement*" ] }, { "cell_type": "code", "execution_count": 1, "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", "\n", "Mais calculé avec la **méthode** des [aiguilles de Buffon](https://fr.wikipedia.org/wiki/Aiguille_de_Buffon), on obtiendrait comme **approximation** :" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.4" } }, "nbformat": 4, "nbformat_minor": 2 }