Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mooc-rr
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
e0b7b3c18a5ee8e9c2fc4ea51c422fea
mooc-rr
Commits
23c8a8c9
Commit
23c8a8c9
authored
Nov 26, 2024
by
e0b7b3c18a5ee8e9c2fc4ea51c422fea
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Numeros de paragraphe générés automatiquement
parent
20397383
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
12 deletions
+19
-12
toy_notebook_fr.ipynb
module2/exo1/toy_notebook_fr.ipynb
+19
-12
No files found.
module2/exo1/toy_notebook_fr.ipynb
View file @
23c8a8c9
...
@@ -4,14 +4,14 @@
...
@@ -4,14 +4,14 @@
"cell_type": "markdown",
"cell_type": "markdown",
"metadata": {},
"metadata": {},
"source": [
"source": [
"#
1
À propos du calcul de π"
"# À propos du calcul de π"
]
]
},
},
{
{
"cell_type": "markdown",
"cell_type": "markdown",
"metadata": {},
"metadata": {},
"source": [
"source": [
"##
1.1
En demandant à la lib maths"
"## En demandant à la lib maths"
]
]
},
},
{
{
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
3
,
"execution_count":
9
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
"cell_type": "markdown",
"cell_type": "markdown",
"metadata": {},
"metadata": {},
"source": [
"source": [
"##
1.2
En utilisant la méthode des aiguilles de Buffon"
"## En utilisant la méthode des aiguilles de Buffon"
]
]
},
},
{
{
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
6
,
"execution_count":
10
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
"3.128911138923655"
"3.128911138923655"
]
]
},
},
"execution_count":
6
,
"execution_count":
10
,
"metadata": {},
"metadata": {},
"output_type": "execute_result"
"output_type": "execute_result"
}
}
...
@@ -82,7 +82,7 @@
...
@@ -82,7 +82,7 @@
"cell_type": "markdown",
"cell_type": "markdown",
"metadata": {},
"metadata": {},
"source": [
"source": [
"##
1.3
Avec un argument \"fréquentiel\" de surface"
"## Avec un argument \"fréquentiel\" de surface"
]
]
},
},
{
{
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
7
,
"execution_count":
11
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -118,7 +118,7 @@
...
@@ -118,7 +118,7 @@
"N = 1000\n",
"N = 1000\n",
"x = np.random.uniform(size=N, low=0, high=1)\n",
"x = np.random.uniform(size=N, low=0, high=1)\n",
"y = np.random.uniform(size=N, low=0, high=1)\n",
"y = np.random.uniform(size=N, low=0, high=1)\n",
"
1
\n",
"\n",
"accept = (x*x+y*y) <= 1\n",
"accept = (x*x+y*y) <= 1\n",
"reject = np.logical_not(accept)\n",
"reject = np.logical_not(accept)\n",
"fig, ax = plt.subplots(1)\n",
"fig, ax = plt.subplots(1)\n",
...
@@ -131,12 +131,12 @@
...
@@ -131,12 +131,12 @@
"cell_type": "markdown",
"cell_type": "markdown",
"metadata": {},
"metadata": {},
"source": [
"source": [
"Il est alors aisé d’obtenir une approximation (pas terrible) de
π
en comptant combien de fois, en moyenne, $X^2 + Y^2$ est inférieur à 1 :"
"Il est alors aisé d’obtenir une approximation (pas terrible) de
$\\pi$
en comptant combien de fois, en moyenne, $X^2 + Y^2$ est inférieur à 1 :"
]
]
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
8
,
"execution_count":
12
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -145,7 +145,7 @@
...
@@ -145,7 +145,7 @@
"3.112"
"3.112"
]
]
},
},
"execution_count":
8
,
"execution_count":
12
,
"metadata": {},
"metadata": {},
"output_type": "execute_result"
"output_type": "execute_result"
}
}
...
@@ -153,6 +153,13 @@
...
@@ -153,6 +153,13 @@
"source": [
"source": [
"4*np.mean(accept)"
"4*np.mean(accept)"
]
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
}
],
],
"metadata": {
"metadata": {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment