Montreal Python Workshop/Saturday lecture: Difference between revisions
Content added Content deleted
No edit summary |
imported>StatMarianne (Traduction en français) |
||
Line 1: | Line 1: | ||
Bienvenue au cours du samedi de l'Atelier Montréal-Python! Pendant deux heures environ (ou le temps qu'il faudra), nous allons couvrir une initiation au langage de programmation Python à travers un cours et des exercices d'application. |
|||
Welcome to the Saturday lecture section of the Boston Python Workshop! For about 2 hours, we'll work through an introduction to the Python programming language via both a lecture and hand-on exercises. |
|||
== |
== Ressources == |
||
* [[Montreal Python Workshop/Data types| Python data types cheat sheet]]. |
* [[Montreal Python Workshop/Data types| Python data types cheat sheet]]. |
||
* [[Montreal Python Workshop/Loops| Python loops cheat sheet]]. |
* [[Montreal Python Workshop/Loops| Python loops cheat sheet]]. |
||
* [https://raw.github.com/jvns/mtlpytutorial/master/capitals.py capitals.py] -- |
* [https://raw.github.com/jvns/mtlpytutorial/master/capitals.py capitals.py] -- exemple avec les capitales des provinces. |
||
* [http://codingbat.com/home/bostonpythonworkshop@gmail.com/SaturdayMorning Saturday morning CodingBat review]. |
* [http://codingbat.com/home/bostonpythonworkshop@gmail.com/SaturdayMorning Saturday morning CodingBat review]. |
||
* [http://codingbat.com/home/bostonpythonworkshop@gmail.com/Saturday Saturday lecture CodingBat practice]. |
* [http://codingbat.com/home/bostonpythonworkshop@gmail.com/Saturday Saturday lecture CodingBat practice]. |
||
Si vous souhaitez pratiquer davantage, consultez le [http://docs.python.org/2/tutorial/introduction tutoriel officiel] de Python. |
|||
[[Montreal Python Workshop|« |
[[Montreal Python Workshop|« Retour à la page d'accueil de l'Atelier]] |
||
== |
== Plan du cours == |
||
# Rappels sur le contenu vu vendredi |
|||
# review Friday material |
|||
#* |
#* maths |
||
#* <tt>type()</tt> |
#* <tt>type()</tt> |
||
#* variables |
#* variables |
||
#* chaînes de caractères |
|||
#* strings |
|||
#* |
#* booléens |
||
#* <tt>if</tt>/<tt>elif</tt>/<tt>else</tt> |
#* <tt>if</tt>/<tt>elif</tt>/<tt>else</tt> |
||
#* |
#* fonctions |
||
# |
# listes |
||
#* |
#* but |
||
#* initialisation |
|||
#* initialization |
|||
#* <tt>len()</tt> |
#* retour sur <tt>len()</tt> |
||
#* accéder à des éléments |
|||
#* accessing elements |
|||
#* ajouter des éléments |
|||
#* adding elements |
|||
#* modifier des éléments |
|||
#* changing elements |
|||
#* "trancher" des listes (slicing) |
|||
#* slicing lists |
|||
#* chaînes de caractères comme des listes |
|||
#* strings are like lists |
|||
# boucles et contrôle de flux |
|||
# loops and more flow control |
|||
#* <tt>for</tt> |
#* boucles <tt>for</tt> |
||
#* <tt>if</tt> |
#* conditions <tt>if</tt> à l'intérieur de boucles <tt>for</tt> |
||
#* |
#* boucles <tt>for</tt> emboîtées |
||
#* <tt>range()</tt> |
#* <tt>range()</tt> |
||
#* <tt>while</tt> |
#* boucles <tt>while</tt> |
||
#* boucles infinies |
|||
#* infinite loops |
|||
#* <tt>if</tt> |
#* conditions <tt>if</tt> à l'intérieur de boucles <tt>while</tt> |
||
#* <tt>break</tt> |
#* <tt>break</tt> |
||
#* <tt>raw_input()</tt> |
#* <tt>raw_input()</tt> |
||
# dictionnaires |
|||
# dictionaries |
|||
#* |
#* but |
||
#* initialisation |
|||
#* initialization |
|||
#* accéder à des éléments |
|||
#* accessing elements |
|||
#* ajouter des éléments |
|||
#* adding elements |
|||
#* modifier des éléments |
|||
#* changing elements |
|||
#* <tt>keys()</tt> |
#* <tt>keys()</tt> et <tt>values()</tt> |
||
# modules |
# modules |
||
#* |
#* but |
||
#* intégrés (builtin) |
|||
#* builtins |
|||
#* imports |
#* imports |
||
#* <tt>import random</tt> |
#* <tt>import random</tt> |
||
#* <tt>random.randint</tt> |
#* <tt>random.randint</tt> |
||
#* <tt>random.choice</tt> |
#* <tt>random.choice</tt> |
||
# |
# Parcourons capitals.py |
||
capitals.py (situé https://raw.github.com/jvns/mtlpytutorial/master/capitals.py) constitue le bouquet final et la synthèse du cours. |
|||
[[ |
[[Montreal Python Workshop|« Retour à la page d'accueil de l'Atelier]] |