About the course

This course was originally written by Thomas Robitaille, and was adapted by Markus Demleitner, Robert Schmidt and Yiannis Tsapras.

The web page for this course is http://www.ita.uni-heidelberg.de/~dullemond/lectures/python_2020_WS/index.html.

The Uebungsgruppe-System link is https://uebungen.physik.uni-heidelberg.de/uebungen/liste.php?vorl=1272. Note that this lecture has a Rocket-Chat channel.

The Zoom session requires registration https://zoom.us/meeting/register/tJErcO-tqj8tGNL9rtC1AXcnY2QEMfzzC60n.

The lecturer is Cornelis ("Kees") Dullemond. You can contact me during the course and at dullemond@uni-heidelberg.de


  • Using the IPython Notebook
  • Introduction to Python
  • Modules and Functions
  • Introduction to Numpy and Matplotlib
  • Reading/writing data from files
  • Introduction to Scipy (interpolation, integration, fitting)
  • Applying Python to scientific problems
  • Object-oriented programming (if there is time)


The block course lasts five days. Participation is over Zoom. Every day I will create breakout rooms and randomly assign you to one of the breakout rooms.

Each day will follow this schedule:

  • 9:00-10:30 - lecture/exercises
  • 10:30-11:00 - break
  • 11:00-12:30 - lecture/exercises
  • 12:30-13:30 - break for lunch
  • 13:30-14:30 - lecture/exercises
  • 14:30-17:00 - finish homework, teacher will remain available via RocketChat, eMail and Zoom

The format is: Every now and then I'll explain stuff for all (lecture-like), but for the rest you will work through the material. I will then cycle through the breakout rooms to see if there are problems. Note that Zoom has a "call help" button.

There will be problem sets during the week, and you will be required to hand these in a deadline indicated on the problem sheet. An average of 60% in the problem sets will be required to obtain 2 credits points at the end of the course.

The course will be in English.

I am happy to review or talk about your code/solutions to exercises.

Solutions to problem sheets

All solutions should be submitted as IPython (/Jupyter) notebooks (.ipynb) or python programs (.py) (one notebook/program per problem set). Please use a filename that contains the name of the problem sheet and your name. (e.g. problem_sheet_1_firstname_surname.ipynb ).

The files can be submitted to me directly via email: dullemond@uni-heidelberg.de.

The following criteria are taken into account for grading problem sets - the notebook/program should:

  • run with no errors under python3
  • produce the correct results
  • be clearly readable, and include text to explain what you are doing and why
  • not include any unused code! (-> readability)
  • be well presented

Please make use of the ability to add comments and text around your code. Make it so that someone not familiar with the problem could read it and understand your solution.

There is never a unique solution to a problem, so it does not matter if your programs do not look the same as somebody else's! What matters most is that you get a chance to make mistakes and learn from them.

Policy on handing in solutions

Problem set submissions need to be handed in separately for each participant.

The deadlines for the Problem Sets are:

Problem Set 1 This Wednesday, 7pm CEST

Problem Set 2 This Friday, 7pm CEST

Problem Set 3 Next Friday (one week after the end of the course), 7pm CEST

Installing Python

Given that the course is online, you will need to install Python on your laptop, you have several possibilities:

  • If you have a linux laptop and are familiar with package managers, most major scientific Python packages are available through these
  • Otherwise, try and install the Anaconda Python distribution. An alternative link is this install link.

Using the Jupyter server of the Physics department:

Alternatively you can use the Jupyter server of the Physics department:


You log in with your student ID and password. If all went well, you see a kind of file browser. It shows your home directory on the Jupiter server.

Lecture Notes & Notebooks

You can download the notebooks I'm showing, the problem sets and the ancillary data files from here .

You can dowload the individual files as we go along.

Just refresh your notebook viewer after you've downloaded a file.