1003 lines
41 KiB
Plaintext
1003 lines
41 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"# Mémo Python\n",
|
|
"\n",
|
|
"[Python par Repl.it](#Avec-Repl.it)\n",
|
|
"\n",
|
|
"-----------\n",
|
|
"Notions de programmation\n",
|
|
"* [Les variables](#Les-variables)\n",
|
|
"* [input](#input)\n",
|
|
"* [Les conditions if](#Condition-if)\n",
|
|
"* [Les boucles for](#Boucles-for)\n",
|
|
"* [Les boucles while](#Boucles-while)\n",
|
|
"* [Les fonctions](#Fonctions)\n",
|
|
"* [Les listes](#Listes)\n",
|
|
"* [Les graphiques](#Graphiques)\n",
|
|
"------------\n",
|
|
"Ressouces Python\n",
|
|
"* [site du zero](http://openclassrooms.com/courses/apprenez-a-programmer-en-python) (cours en ligne)\n",
|
|
"* [codeacademy](http://www.codecademy.com/) (cours en ligne)\n",
|
|
"* [code conbat](http://codecombat.com) (jeu en ligne qui se joue en codant)\n",
|
|
"* [checkio](http://www.checkio.org/) (jeu en ligne - anglais - avec beaucoup de langage différents)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Avec Repl.it\n",
|
|
"\n",
|
|
"Se rendre sur le site de [repl.it](https://repl.it/repls/SpiffyOpulentBackend). \n",
|
|
"\n",
|
|
"L'interface se sépare en 2 parties:\n",
|
|
"\n",
|
|
"![interface replit](./fig/replit_global.png)\n",
|
|
"\n",
|
|
"- **Zone Script**: Éditeur de texte où l'on pourra écrire notre programme python. Pour executer son contenu, il faudra cliquer sur ![replit run](./fig/replit_run.png)\n",
|
|
"- **Zone Shell**: Line de commande pour interagir avec python. Ici vous pouvez tester vos commandes python et presser la touche *entrer* pour l'executer. Par contre on ne peut pas écrire sur plusieurs lignes.\n",
|
|
"\n",
|
|
"Il est conseillé d'utiliser en priorité la **zone script** car elle permet d'écrire sur plusieurs lignes et de corriger après l'execution. La **zone shell** servira à tester des commandes pour voir directement leurs effets. \n",
|
|
"\n",
|
|
"Pour sauvergarder votre travail, vous cliquerez sur les 3 points à côté de *Files* puis sur *download as zip*.\n",
|
|
"\n",
|
|
"![replit save](./fig/replit_files.png)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Les variables\n",
|
|
"\n",
|
|
"Les variables sont des *enveloppes* où l'on stockera des nombres, des mots, des phrases ou des choses plus compliqués."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 1,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"un_nombre = 10"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Ainsi dans *l'enveloppe* appelée **un_nombre** on y met le nombre 10.\n",
|
|
"\n",
|
|
"C'est ce que l'on appelle **assigner** une **valeur** à une variable ou **stocker** une valeur dans une variable."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 2,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"10\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"un_nombre = 10\n",
|
|
"print(un_nombre) "
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Pour stocker des mots ou des phrases, il faut les mettre entre guillemets"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 3,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"un_mot = \"Coucou\"\n",
|
|
"une_phrase = \"ceci est une phrase\""
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"\n",
|
|
"## input\n",
|
|
"\n",
|
|
"Contrairement à ce que l'on a fait hier on ne met plus rien dans les parenthèses d'un `input`.\n",
|
|
"\n",
|
|
"`input()` est une commande qui va demander à l'utilisateur une information "
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 4,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"Comment t'appelles tu?\n",
|
|
"bobo\n",
|
|
"Ah! Tu t'appelles bobo\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"print(\"Comment t'appelles tu?\")\n",
|
|
"nom = input()\n",
|
|
"print(\"Ah! Tu t'appelles\", nom)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Après avoir afficher la question, l'ordinateur se met en pose et attend que l'utilisateur réponde quelque chose. Une fois que l'utilisateur a répondu (a appuyé sur `entrer`) la réponse est stocké, ici, dans la variable `nom`."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Condition if\n",
|
|
"\n",
|
|
"Pour différencier plusieurs cas, on utilisera la commande `if` (si), `elif` (sinon si) et `else` (sinon)."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 5,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"a est plus petit que b\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"a = 2\n",
|
|
"b = 3\n",
|
|
"\n",
|
|
"if a > b: # Si\n",
|
|
" print(\"a plus grand que b\")\n",
|
|
"elif a == b: # Sinon si\n",
|
|
" print(\"a est égal à b\")\n",
|
|
"else: # Sinon\n",
|
|
" print(\"a est plus petit que b\")"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Boucles for\n",
|
|
"\n",
|
|
"Les boucles **for** permettent de répéter un certain nombre de fois la même action.\n",
|
|
"\n",
|
|
"* Générer plusieurs valeurs:"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 6,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"0\n",
|
|
"1\n",
|
|
"2\n",
|
|
"3\n",
|
|
"4\n",
|
|
"5\n",
|
|
"6\n",
|
|
"7\n",
|
|
"8\n",
|
|
"9\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"for x in range(10):\n",
|
|
" print(x)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Python a créé une variable `x` puis lui a fait prendre toutes les valeurs entre 0 et 9.\n",
|
|
"\n",
|
|
"* Ajouter 5 fois 100 d'affilé"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 7,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"Au debut a vaut 2\n",
|
|
"a vaut maintenant 102\n",
|
|
"a vaut maintenant 202\n",
|
|
"a vaut maintenant 302\n",
|
|
"a vaut maintenant 402\n",
|
|
"a vaut maintenant 502\n",
|
|
"Finalement a vaut 502\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"a = 2\n",
|
|
"print(\"Au debut a vaut\", a)\n",
|
|
"for i in range(5):\n",
|
|
" a = a + 100\n",
|
|
" print(\"a vaut maintenant\", a)\n",
|
|
"print(\"Finalement a vaut\", a)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"* On peut aussi parcourir les lettres d'un mot ou d'une phrase"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 8,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"On enumere >>> boujour toi\n",
|
|
"b\n",
|
|
"o\n",
|
|
"u\n",
|
|
"j\n",
|
|
"o\n",
|
|
"u\n",
|
|
"r\n",
|
|
" \n",
|
|
"t\n",
|
|
"o\n",
|
|
"i\n",
|
|
"Toutes les lettres ont été énumérées\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"phrase = \"boujour toi\"\n",
|
|
"print(\"On enumere >>> \", phrase)\n",
|
|
"for l in phrase:\n",
|
|
" print(l)\n",
|
|
"print(\"Toutes les lettres ont été énumérées\")"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"* Ou encore tous les éléments d'une liste"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 9,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"On enumère >>> ['premier element', 2, 'coucou', 1, 'aie', 0]\n",
|
|
"premier element\n",
|
|
"2\n",
|
|
"coucou\n",
|
|
"1\n",
|
|
"aie\n",
|
|
"0\n",
|
|
"Tout a été énuméré\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"liste = [\"premier element\", 2, \"coucou\", 1, \"aie\", 0]\n",
|
|
"print(\"On enumère >>>\", liste)\n",
|
|
"for i in liste:\n",
|
|
" print(i)\n",
|
|
"print(\"Tout a été énuméré\")"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Boucles while\n",
|
|
"\n",
|
|
"En anglais, `while` signifie **tant que**. On l'utilisera quand on veut refaire quelque plusieurs fois **tant que** quelque chose n'est pas vrais.\n",
|
|
"\n",
|
|
"Ajouter 3 **tant que** que `u` n'a pas dépassé 19: "
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 10,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"u vaut 5\n",
|
|
"u vaut 8\n",
|
|
"u vaut 11\n",
|
|
"u vaut 14\n",
|
|
"u vaut 17\n",
|
|
"u vaut 20\n",
|
|
"u a depassé 50 et vaut 20\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"u = 2\n",
|
|
"while u < 19:\n",
|
|
" u = u + 3\n",
|
|
" print(\"u vaut \", u)\n",
|
|
"print(\"u a depassé 50 et vaut\", u)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Poser toujours la même question quand que l'utilisateur n'a pas bien répondu:"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 11,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"Quelle est la couleur du cheval blanc d'Henri 4?\n",
|
|
"vert\n",
|
|
"Non! Recommence!\n",
|
|
"Quelle est la couleur du cheval blanc d'Henri 4?\n",
|
|
"rouge\n",
|
|
"Non! Recommence!\n",
|
|
"Quelle est la couleur du cheval blanc d'Henri 4?\n",
|
|
"blanc\n",
|
|
"Bravo!\n",
|
|
"Voila tu as réussi!\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"aPasTrouve = True # True signifie vrai en anglais.\n",
|
|
"while aPasTrouve:\n",
|
|
" print(\"Quelle est la couleur du cheval blanc d'Henri 4?\")\n",
|
|
" rep = input()\n",
|
|
" if rep == \"blanc\":\n",
|
|
" print(\"Bravo!\")\n",
|
|
" aPasTrouve = False # False signifie faux en anglais\n",
|
|
" else:\n",
|
|
" print(\"Non! Recommence!\")\n",
|
|
"print(\"Voila tu as réussi!\")"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Fonctions\n",
|
|
"\n",
|
|
"Une fonction est un morceau de programme qui évitera de coder plusieurs fois la même chose. Quand on programme on dit souvent `Si c'est la 3e fois que l'on écrit ces lignes c'est qu'il faut en faire une fonction`.\n",
|
|
"\n",
|
|
"Voici différentes utilisations de fonctions."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"### Fonctions numériques\n",
|
|
"\n",
|
|
"En math, on utilise les fonctions pour décrire les transformations (de nombres le plus souvent). \n",
|
|
"\n",
|
|
"Par exemple:\n",
|
|
"$$ f:x \\mapsto 3x + 2$$\n",
|
|
"Cette fonction $f$ prend un nombre, le multiplie par 3 puis ajoute 2. On pourra la coder de la façon suivante:"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 12,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"def f(x):\n",
|
|
" return 3*x+2"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"On vient de coder cette fonction, on peut ensuite l'utiliser"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 13,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"14\n",
|
|
"L'image de 2.5 par la fonction f est 9.5\n",
|
|
"f(-2) = -4\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"print(f(4))\n",
|
|
"print(\"L'image de 2.5 par la fonction f est \", f(2.5))\n",
|
|
"print(\"f(-2) = \", f(-2))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Au collège, on a vu les \"programmes de calculs\". Ils peuvent eux aussi être codé avec des fonctions.\n",
|
|
"\n",
|
|
"- Choisir un nombre\n",
|
|
"- Ajouter 5\n",
|
|
"- Diviser par 10\n",
|
|
"\n",
|
|
"Se code de la façon suivante:"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 14,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"def programme(nombre):\n",
|
|
" reponse = nombre + 5\n",
|
|
" reponse = reponse / 10\n",
|
|
" return reponse"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 15,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"6.5\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"print(programme(60))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"### D'autres fonctions\n",
|
|
"\n",
|
|
"Les fonctions numériques sont très utilisées en math mais en programmation, on manipule beaucoup d'autres types de fonctions.\n",
|
|
"\n",
|
|
"On pourrait vouloir transformer un texte en un titre entouré de symboles `#`."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 16,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"def entoure(titre):\n",
|
|
" return '##### ' + titre + ' #####'"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 17,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"##### Mon titre #####\n",
|
|
"##### L'histoire du petit chaperon rouge #####\n",
|
|
"##### Fin #####\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"print(entoure('Mon titre'))\n",
|
|
"print(entoure(\"L'histoire du petit chaperon rouge\"))\n",
|
|
"print(entoure('Fin'))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"On peut même mettre un autre argument (en plus de `titre`) pour entourer avec autre chose que `#`."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 18,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"def entoure(texte, symbole):\n",
|
|
" return symbole*4 + ' ' + texte + ' ' + symbole*4"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 19,
|
|
"metadata": {
|
|
"scrolled": true
|
|
},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"---- La belle au bois dormant ----\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"print(entoure('La belle au bois dormant', '-'))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Listes"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 20,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"L = [5, 2, 1, 2, 4, 5, 5]"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"- `max`: valeur maximal de la liste"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 21,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"5\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"print(max(L))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"- `min`: valeur minimal de la liste "
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 22,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"1\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"print(min(L))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"- `len`: calculer le nombre d'éléments dans la liste"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 23,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"7\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"print(len(L))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"- `sum`: calculer la somme des éléments de la liste"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 24,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"24\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"print(sum(L))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"- `sorted`: trier les éléments de la liste"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 25,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"[1, 2, 2, 4, 5, 5, 5]\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"print(sorted(L))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"- Récupérer le i-ième élément de la liste (**/!\\ on commence à compter à partir de 0**)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 26,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"5\n",
|
|
"1\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"# Le premier élément de la liste\n",
|
|
"print(L[0])\n",
|
|
"# le 3e élément de la liste\n",
|
|
"print(L[2])"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"- Compter l'effectif d'une valeur"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 27,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"2"
|
|
]
|
|
},
|
|
"execution_count": 27,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"L.count(2)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"- Faire une boucle sur tous les éléments de la liste"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 28,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"5\n",
|
|
"2\n",
|
|
"1\n",
|
|
"2\n",
|
|
"4\n",
|
|
"5\n",
|
|
"5\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"for x in L:\n",
|
|
" print(x)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Graphiques\n",
|
|
"\n",
|
|
"Pour faire des graphiques, il faut que la ligne suivante fasse partie des premières lignes de votre programme."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 29,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import matplotlib.pyplot as plt"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Ensuite, on définit les abscisses et les ordonnées sous forme de listes (il faut que les 2 listes aient le même nombre d'éléments)."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 30,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"abscisses = [1, 2, 3, 4, 5, 6]\n",
|
|
"ordonnees = [4, 10, 1, -3, 6, 0]"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"On peut tracer une courbe:"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 31,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"[<matplotlib.lines.Line2D at 0x7f0ad9c090b8>]"
|
|
]
|
|
},
|
|
"execution_count": 31,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
},
|
|
{
|
|
"data": {
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAD8CAYAAABjAo9vAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3Xl0FIeVLvDvakELCLFIAiEBktgxYIPFLnnDG5jYHuN4BWNbOj5nTiaTvPfGDnacl8mbTOyxk0xmkowTIuGNxQvgeI+3eJHYxb4b0M6mZl+FkHTfH92NGwFSS13V1VX1/c7hIIl21VWMvxQfdbtEVUFERM4RZfUARERkLAY7EZHDMNiJiByGwU5E5DAMdiIih2GwExE5DIOdiMhhGOxERA7DYCcicpgYK06akpKiWVlZVpyaiMi21q5de0hVU9t6nSXBnpWVhbKyMitOTURkWyJSFczrWMUQETkMg52IyGEY7EREDsNgJyJyGAY7EZHDBB3sIjJPROpEZEvA13qIyGcissv3c3dzxiQiomC154r9FQC3t/jaHABfqOogAF/4PiciIgsFHeyq+g2AIy2+fBeAV30fvwrgboPmIp8te4+jrLLl/+xERFcWasfeS1X3+z4+AKDXlV4oIk+ISJmIlHk8nhBP6w4HT9Tjob+sxOOvrMHpc41Wj0NENmHYX56q96nYV3wytqrOVdVcVc1NTW1zI9b1VBVPL92Ms+ebcKK+EUvW1Vo9EhHZRKjBflBE0gHA93Nd6CMRACxdtxd/31GHOVO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ad1k5lHlV9WlUzVTULwAMA/q6qMy0ey1Qi0tl3MwB8dcStABx9t5uqHgBQIyJDfF+aAsC0myBizDqw0URkEYAbAKSISC2An6tqsbVTmW4ygFkANvs6ZwB4RlU/snAms6UDeFVEouG98HhLVV1xC6CL9ALwjve6BTEAFqrq36wdKSx+CGCB746YcgCPmXUi29zuSEREwWEVQ0TkMAx2IiKHYbATETkMg52IyGEY7EREDsNgJyJyGAY7EZHDMNiJiBzm/wO6MWnycH6sYgAAAABJRU5ErkJggg==\n",
|
|
"text/plain": [
|
|
"<Figure size 432x288 with 1 Axes>"
|
|
]
|
|
},
|
|
"metadata": {
|
|
"needs_background": "light"
|
|
},
|
|
"output_type": "display_data"
|
|
}
|
|
],
|
|
"source": [
|
|
"plt.plot(abscisses, ordonnees)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Un nuage de points"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 32,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"[<matplotlib.lines.Line2D at 0x7f0ad9b9d978>]"
|
|
]
|
|
},
|
|
"execution_count": 32,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
},
|
|
{
|
|
"data": {
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAD8CAYAAABjAo9vAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAADV1JREFUeJzt3V+MXPdZxvHnwZuoTRrqolipibNMpK5TVRGQMgqUQKiyMUprq+llKqUqBWkvgLI1oGhDhSLuLIHqWgKBrDglqCERyh+1ikPJ4qYqlZrArhPIH4d1FZwmIcGuSkgDFyHwcOERcizb651zZs7Ou9+PZH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69bNCXpL5N8vduRxuJzku4ZvCLmBUmfHdWJJubljgCA88NWDAAUQ9gBoBjCDgDFEHYAKIawA0AxhB0AiiHsAFAMYQeAYv4PZ5whTk/Stt4AAAAASUVORK5CYII=\n",
|
|
"text/plain": [
|
|
"<Figure size 432x288 with 1 Axes>"
|
|
]
|
|
},
|
|
"metadata": {
|
|
"needs_background": "light"
|
|
},
|
|
"output_type": "display_data"
|
|
}
|
|
],
|
|
"source": [
|
|
"plt.plot(abscisses, ordonnees, '+')"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Un diagramme bar"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 33,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"<BarContainer object of 6 artists>"
|
|
]
|
|
},
|
|
"execution_count": 33,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
},
|
|
{
|
|
"data": {
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAD8CAYAAABjAo9vAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAADChJREFUeJzt3V+sZfVZh/Hn6xxIC8VSwwkiw/GQ2JA0xAjuoBWDBqihDim96AVNIG3VnBuLVE3IYGOId5NomjbRaE6AiilCzABpU7AytjS1iaWdAZQ/g7bBoR0EZ5pGW/QC0deL2RcU5885ey1mcd55Psnk7L3Pmt96182TNWuvPTtVhSSpjx+ZegBJ0rgMuyQ1Y9glqRnDLknNGHZJasawS1Izhl2SmjHsktSMYZekZpam2Ok555xTq6urU+xakrasffv2fbeqlk+03SRhX11dZe/evVPsWpK2rCTPb2Q7L8VIUjOGXZKaMeyS1Ixhl6RmDLskNbPhsCe5M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qOcZSVS9W1WPzxz8A9gPnTzvVMHXEy/Onp83/bOmzkSTbgR3A7VPPov8vyduBK4A7AKrqla0UdTjFw95ZklXgEuDRaScZbn7Z4gngELCnqrb6MX0SuAX436kHGVEBDyfZl2Rt6mEGuhA4DHx6frns9iRnTj3UZhj2hpK8DbgP+FhVfX/qeYaqqv+pqp8BtgOXJdmyl82SXAscqqp9U88ysl+sqkuB9wK/Ob/MuVUtAZcCf1pVlwD/CeycdqTNMezNzK9D3wfcXVX3Tz3PmOb/HH4EuGbqWQa4HHjf/Jr0vcCVST4z7UjDVdUL85+HgAeAy6adaJCDwMHX/MtwN0dCv2UY9kbmbzTeAeyvqk9MPc8YkiwnOXv++K3Ae4Bnp51qcVV1a1Vtr6pV4HrgS1V1w8RjDZLkzPmb9cwvWfwKsGXvNKuql4DvJLlo/tJVwJa6AWFp6gGmlOQe4JeBc5IcBG6rqjumnWqQy4EbgSfn16QBfq+qHppwpqHOA+5Kso0jJyJ/VVUtbhFs5FzggSPnFSwBf1lVX5h2pMFuAu6e3xHzHPCRiefZlFP6dkdJ6shLMZLUjGGXpGYMuyQ1Y9glqRnDLknNGHZJasawS1Izhl2Smvk/KJmuLxdSVwgAAAAASUVORK5CYII=\n",
|
|
"text/plain": [
|
|
"<Figure size 432x288 with 1 Axes>"
|
|
]
|
|
},
|
|
"metadata": {
|
|
"needs_background": "light"
|
|
},
|
|
"output_type": "display_data"
|
|
}
|
|
],
|
|
"source": [
|
|
"plt.bar(abscisses, ordonnees)"
|
|
]
|
|
},
|
|
{
|
|
"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.7.3"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 1
|
|
}
|