Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Introduction to Python for Physicists

In this repository, you can find the source code of the material developed for an introduction to Python for physicists that runs as a “minicourse” of 1.5 ECTS as part of the “First Year Physics Lab Course” of the Applied Physics program at TU Delft.

The course consists of 6 core Jupyter notebooks, and additional materials, designed for self-study. The notebooks are self-contained, and include an explanation of the concepts, example code to illustrate the concepts, and exercises (with answers at the end) for testing your knowledge. Below an overview of what is in each notebook.

NotebookDescriptionType
Notebook 1Python BasicsCore material
Notebook 2FunctionsCore material
Notebook 3Program flowCore material
Notebook 4Scientific computingCore material
Notebook 5Data analysisCore material
Notebook 6UncertaintiesCore material
Example examExample examold exam

The notebooks are designed for people with no programming background at all, and are used in the course during 8 afternoons (32 hours). By the end of the course, you should be familiar with:

Each notebook of the first 5 Notebooks start with a pre-post test. If you have some knowledge of programming, you can make the test and see whether you already know the content. If you can make the test without any problems, skip the module. If you are not familiar with programming (in Python), go through the module, do the exercises and finish with the test to see whether you mastered the content. Each notebook includes a list of detailed learning objectives so you know what you should be learning. In addition, there is a “notebook for more advanced programmers”, exploring additional programming concepts in python.

How to use them

If you want to use the notebooks for learning Python, you can download this zip file:

Lecture_Notebooks.zip

The zipfile also includes instructions on how to install Python and start up the notebook server.

Feedback

Did you find a typo? Is there something that is not clear to you? Is there a mistake in the notebooks? We gladly welcome feedback! To give feedback, the easiest for us is for you to submit an “issue” in our repository issue tracker:

Submit an “issue”

In the message, please include:

Developers

The first five notebooks were developed by Gary Steele g.a.steele@tudelft.nl with input and feedback from Jeroen Kalkman J.Kalkman@tudelft.nl and Freek Pols c.f.j.pols@tudelft.nl. These notebooks were then developed further by Freek. All other notebooks were developed by Freek Pols. The notebooks on git have been made by Freek Pols, Rolf Hut and Mark Maletto.

Per notebook we indicate the main contributors.

Note that many TA’s and students have contributed to this project.

Copyright Delft University of Technology and contributors 2019.

Contents

Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Source code

Copyright (c) 2019, Delft University of Technology and contributors
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Build locally

This book and all its content can be downloaded and run locally. In the repository you will find a pixi.toml file. After downloading the repo and installing pixi, simply run pixi run myst from the root folder.