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
4273f2ba61d873c01ff7dbef7231bb4c
mooc-rr
Commits
49802b18
You need to sign in or sign up before continuing.
Commit
49802b18
authored
May 24, 2020
by
4273f2ba61d873c01ff7dbef7231bb4c
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deux cellules
parent
608c32e2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
112 additions
and
0 deletions
+112
-0
Premier_Test.ipynb
module2/exo1/Premier_Test.ipynb
+112
-0
No files found.
module2/exo1/Premier_Test.ipynb
0 → 100644
View file @
49802b18
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Fichier test de calculs en python"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## boucle for"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0\n",
"1\n",
"2\n",
"3\n",
"4\n"
]
}
],
"source": [
"for i in range(5): # ici un commentaire du code\n",
" print(i)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"texte simple comme un commentaire des résultats"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## test if / else"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0\n",
"nombre pair\n"
]
}
],
"source": [
"var1 = 10\n",
"print(var1 % 2)\n",
"if (var1 % 2) == 0:\n",
" print (\"nombre pair\"), var1\n",
"else:\n",
" print (\"nombre impair\"), var1"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"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