From 640c57fd2ab673fd42daebef76e9328a4c16b4aa Mon Sep 17 00:00:00 2001 From: a829a5ef5d74929a9597c44c80f67c38 Date: Mon, 15 Mar 2021 20:57:14 +0000 Subject: [PATCH] no commit message --- module2/exo1/toy_notebook_en.ipynb | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/module2/exo1/toy_notebook_en.ipynb b/module2/exo1/toy_notebook_en.ipynb index c308d13..8e2871a 100644 --- a/module2/exo1/toy_notebook_en.ipynb +++ b/module2/exo1/toy_notebook_en.ipynb @@ -8,9 +8,26 @@ "source": [ "# On the computation of $\\pi$\n", "\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ "## Asking the maths library\n", "My computer tells me that $\\pi$ is *approximatively*\n", - "\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ "from math import *\n", "print(pi)\n", "\n", @@ -22,7 +39,7 @@ "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)\n" + "2/(sum((x+np.sin(theta))>1)/N)" ] }, { -- 2.18.1