Advanced Python Course
Chalmers DAT690 / DIT516 / DAT516
2026
by John J. Camilleri & Muhammad Mustafa Hassan
The purpose of this lab is to get you up and running with everything you need to start working on Labs 1–3. This exercise targets learning objectives:
Firstly, it is essential that you have a working Python installation on your computer, together with a text editor or IDE such as VS Code. You also need to have some familiarity with your computer’s terminal/shell.
Hopefully you already have these from a previous course. Note that web-based solutions like the Self Practice tool or Jupyter Notebook will not be enough.
Before progressing to the next step, ensure that you can:
hello.py.python3 hello.py.In this course we are going to be installing and using external Python libraries. In order to be able to do this, you need to be familiar with how to set up virtual environments.
The general idea is that each project has its own virtual environment into which packages are installed. See the instructions in the lecture notes here: Packages and virtual environments
Before progressing to the next step, ensure that you can:
rich into your virtual environment with pip install rich.Import this library in your own code and use it, e.g. with this code snippet:
from rich import print
print("Hello, [bold green]World[/bold green]!", ":snake:")
The Git version control tool will be used throughout this course for:
It is therefore important to get the hang of Git early on. To complete this step, do the following:
git@git.chalmers.se:username/my-repo.gitgit clone git@git.chalmers.se:username/my-repo.git on the command line or directly inside of VS Code.README.md.README.md file.https://git.chalmers.se/username/my-repogit checkout -b my-new-branchhello.py file created previously to the repository, and write something about it in README.md.main branch.main branch with git checkout main. The changes you made in the new branch will appear to have been undone.git pull and you should see that the latest changes have also been updated in the main branch.