Encore quelques corrections

parent 9c7349fb
......@@ -12,7 +12,7 @@
"metadata": {},
"source": [
"## En demandant à la lib maths\n",
"Mon ordinateur m’indique que vaut *approximativement*"
"Mon ordinateur m’indique que $\\pi$ vaut *approximativement*"
]
},
{
......@@ -40,7 +40,7 @@
"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_Buffonb), on obtiendrait comme approximation:"
"Mais calculé avec la __méthode__ des [aiguilles de Buffon](https://fr.wikipedia.org/wiki/Aiguille_de_Buffonb), on obtiendrait comme __approximation__:"
]
},
{
......@@ -102,8 +102,10 @@
"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",
"\n",
"accept = (x*x+y*y) <= 1\n",
"reject = np.logical_not(accept)\n",
"\n",
"fig, ax = plt.subplots(1)\n",
"ax.scatter(x[accept], y[accept], c='b', alpha=0.2, edgecolor=None)\n",
"ax.scatter(x[reject], y[reject], c='r', alpha=0.2, edgecolor=None)\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment