Section outline

  • Welcome to the First Part of the Programming Course

    This first part of the course is an intensive two-week program made up of 7 sessions, each lasting 3 hours. The goal is to help you (re)discover Python and its most useful scientific libraries for physicists: NumPy, Matplotlib, and SciPy.

    Structure of the Sessions

    The program is built around 5 practical sessions, each of them contained in a separate Jupyter Notebook. These notebooks are designed to guide you progressively from basic concepts to applied exercises, and each one follows the same structure.

    Concepts and Syntax
    • The notebooks begin with explanations of Python objects, syntax, and functions relevant to the session.

    • These explanations are written in plain text.

    Illustrative Coding Examples

    • Throughout the notebook, you’ll find small programs or pieces of code marked with a symbol.

    • These are meant to illustrate how certain functions or objects behave.

    • Don’t just run the code modify it, add print statements, change parameters, and see what happens.

    • Sometimes, you’ll be prompted with # COMMENT REQUIRED: this is your cue to add your own explanation of what the code is doing. It’s a great way to make sure you’ve really understood it.

    From Examples to Insight

    • After running and analyzing the examples, you’ll encounter moments for reflection and synthesis. These are marked with the symbol.

    • You’ll be asked to summarize, compare, or deduce general principles based on what you’ve observed. These parts are key to consolidating your understanding.

    Exercises

    • At the end of each notebook, you’ll find a series of exercises to apply what you’ve learned. They range from simple to more challenging problems.

    Collective Thinking and Peer Discussion

    • During the sessions, we’ll also have short brainstorming moments to share ideas and insights as a group.

    • These moments will also serve as a form of collective correction and feedback on the reflection and synthesis questions marked by in the notebook.

    • The goal is to build a shared understanding of the tools and concepts you’re learning.

    • Don’t hesitate to talk with your peers: whether you’re trying to deduce a concept, struggling to understand a code example, or unsure about how something works — talking it through with someone else is often the best way to understand.

    How to Use the Notebooks

    1. Download the folder containing all the notebooks.

    2. Open a terminal and navigate to the folder using the cd command.

    3. Then launch Jupyter with the command: jupyter notebook

    4. A browser window will open where you can select and run the notebooks.

    Additional Resources

    Alongside the notebooks, a complete PDF file of detailed lecture notes is available. (I thank Hervé Wozniak for sharing his notes.)

    This document contains all the explanations covered in the course, as well as many additional details and examples. 

    It is regularly referenced in the notebooks, so it’s highly recommended to consult it while working through the practicals.

    It can also serve as a valuable reference guide during and after the course.

    Final Advice

    These sessions are designed to be active and exploratory. The more you test, comment, and experiment, the more you’ll learn. Programming is not about memorizing — it’s about understanding how things work by trying them out.

    Let’s get started—and enjoy the process!