Ecole Centrale d'Electronique 2023–24 Sem. 1
Programming in Python
Master course, Temporary Lecturer, sole instructor
24h: lecture (12h) + lab (8h) + project (4h)
Module: Programming in Python (24h) - Lecture (12h), Lab (8h), and Project (4h) - Personal work (2h-4h per week)
I designed and delivered this course entirely by myself as sole instructor, from the curriculum down to every slide deck, lab sheet, and project brief. The module is organized as five paired sessions (a lecture followed by a hands-on lab) and closes with a graded mini-project, giving students a full progression from first script to a small object-oriented application.
Class 1: Introduction to Python
Lecture (“Class 1 - Python Introduction”)
- Programming basics (definition, history, and applications)
- Installation of Python and Jupyter Notebook, virtual environments
- Variables and types (int, float, str, bool)
- Arithmetic, comparison, and logical operators
Lab (“TP 1 - Python Introduction”)
- Guided exercises writing and running first scripts and notebooks
- Practice manipulating variables, types, and operators to build small calculators
Class 2: Conditional statements, loops, and functions
Lecture (“Class 2 - Conditions, boucles, fonctions”)
- Conditional statements (if, elif, else)
- Loops (for, while)
- Functions (definition, arguments, return)
- Generators
- Coding conventions (docstrings, PEP8)
Lab (“TP 2 - Conditions, boucles, fonctions”)
- Exercises combining branching, loops, and functions to solve short algorithmic problems
- Introduction to writing readable, well-documented code following PEP8
Class 3: Data structures
Lecture (“Class 3 - String, Listes, Tuples, Dictionnaires”)
- Strings (definition, methods)
- Lists and tuples (definition, methods)
- Dictionaries and sets (definition, methods)
Lab (“TP 3 - String, Listes, Tuples, Dictionnaires”)
- Applied exercises manipulating and combining strings, lists, tuples, and dictionaries
- Choosing the right data structure for a given problem
Class 4: Exceptions, files, and object-oriented programming
Lecture (“Class 4 - Modules, exceptions, fichiers, classes”)
- Exceptions (definition, handling)
- Files (reading, writing)
- Modules and packages (definition, import, creation, installation)
- Object-oriented programming (classes, objects, inheritance, polymorphism)
Lab (“TP 4 - Modules, exceptions, fichiers, classes”)
- Exercises building small class hierarchies and handling file I/O and error cases robustly
Class 5: Introduction to NumPy, Pandas and Matplotlib
Lecture (“Class 5 - Bibliothèques Numpy, Pandas, Matplotlib”)
- Revisiting data structures through NumPy arrays and Pandas DataFrames as classes
- Numerical computation with NumPy
- Data manipulation (slicing, indexing, filtering) with Pandas
- Data visualization with Matplotlib
Lab (“TP 5 - Bibliothèques Numpy, Pandas, Matplotlib”)
- Exercises processing and visualizing datasets with NumPy, Pandas, and Matplotlib
Final project
A graded mini-project (“Projet - Instructions”, implemented in “TP 5 - Mini-Projet NumPy Poker”) asking students to build a Poker hand-evaluation program in Python, combining object-oriented design, data structures, and NumPy to simulate hands, rank combinations, and compute probabilities: a synthesis of every topic covered in the course.