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
99722bbe49f1a8d1a813f6c5b19fdd6e
mooc-rr
Commits
d81d7c83
Commit
d81d7c83
authored
Dec 13, 2020
by
99722bbe49f1a8d1a813f6c5b19fdd6e
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no commit message
parent
fed5a129
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
244 additions
and
3 deletions
+244
-3
module2_ressources_sequence4_examples_tutorial.ipynb
...exo1/module2_ressources_sequence4_examples_tutorial.ipynb
+193
-0
toy_notebook_fr.ipynb
module2/exo1/toy_notebook_fr.ipynb
+51
-3
No files found.
module2/exo1/module2_ressources_sequence4_examples_tutorial.ipynb
0 → 100644
View file @
d81d7c83
This diff is collapsed.
Click to expand it.
module2/exo1/toy_notebook_fr.ipynb
View file @
d81d7c83
{
"cells": [],
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 1 À propos du calcul de π"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"3.141592653589793\n"
]
},
{
"data": {
"text/plain": [
"3.128911138923655"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from math import *\n",
"print (pi)\n",
"import numpy as np\n",
"np.random.seed(seed=42)\n",
"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)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
...
...
@@ -16,10 +65,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.
3
"
"version": "3.6.
4
"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
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