From 3643cddd8be6ad4ecb6d2b8a00b57cc111d32452 Mon Sep 17 00:00:00 2001 From: 6b2894622ff3cf5b8069a0ecc423c4f8 <6b2894622ff3cf5b8069a0ecc423c4f8@app-learninglab.inria.fr> Date: Sun, 19 Apr 2020 17:03:05 +0000 Subject: [PATCH] 19h02 --- module2/exo1/toy_notebook_fr.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module2/exo1/toy_notebook_fr.ipynb b/module2/exo1/toy_notebook_fr.ipynb index d166cd6..a2cf014 100644 --- a/module2/exo1/toy_notebook_fr.ipynb +++ b/module2/exo1/toy_notebook_fr.ipynb @@ -42,7 +42,7 @@ }, "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** : " + "Mais calculé avec la __méthode__ des [Aiguilles de Buffon](https://fr.wikipedia.org/wiki/Aiguille_de_Buffon), on obtiendrait comme __approximation__ : " ] }, { @@ -70,7 +70,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)" + "2/(sum((x+np.sin(theta)) > 1)/N)" ] }, { @@ -113,7 +113,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", - "accept = (x*x+y*y)<=1\n", + "accept = (x*x+y*y) <= 1\n", "reject = np.logical_not(accept)\n", "fig, ax = plt.subplots(1)\n", "ax.scatter(x[accept], y[accept], c='b', alpha=0.2, edgecolor=None)\n", -- 2.18.1