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
a829a5ef5d74929a9597c44c80f67c38
mooc-rr
Commits
640c57fd
Commit
640c57fd
authored
Mar 15, 2021
by
a829a5ef5d74929a9597c44c80f67c38
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no commit message
parent
3d392e96
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
toy_notebook_en.ipynb
module2/exo1/toy_notebook_en.ipynb
+19
-2
No files found.
module2/exo1/toy_notebook_en.ipynb
View file @
640c57fd
...
...
@@ -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)"
]
},
{
...
...
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