Exam practicals#

To confirm you are enrolled for the exam and to see the date and location please go to eksamensplan.dtu.dk. The practical information for the exam can be found in the following document:

Installing and testing the code during the exam#

To work on the programming exercises, first make sure you have a working installation of the course software on your computer.

During the exam you will download a .zip file. You can find four examples here: https://gitlab.compute.dtu.dk/02465material/02465students.

Tip

You can test this procedure now using the irlc/exam/exam2023spring exam set.

The .zip file has the same structure as your student folder. Move the directory irlc/exam/exam2025spring (in the .zip-file) to the directory with the same name on your computer, i.e. irlc/exam/exam2025spring. This is much easier explained using a video:

Note

The .zip-files with the programming problems contain a copy of the exercises including the solutions. I will upload newer versions of the exam files with all exercise solutions later in the course, however, the exam sets can be completed in their current version.

You can test this procedure using the three test exams:

Warning

Internet access will be restricted and therefore you cannot use pip install to install packages during the exam. I therefore recommend that you just make sure you can complete the old exam sets a few days before the exam, and then don’t change anything related to your python installation before the exam.

After you have copied the files from the .zip-file to your computer your file explorer in VS Code should look similar to this:

The VSCode editor after the exam files have been moved over. The spring 2023 exam is shown here.

Warning

When you copy the files, be careful to preserve the directory structure. As an example, suppose my exercises are in the folder: /home/tuhe/Documents/02465students The following shows a correct/incorrect location of the question_pid.py file from the midterm test exam:

Correct:

/home/tuhe/Documents/02465students/irlc/exam/midterm2023a/question_pid.py This is the correct location of the files. You just copy them into the (e.g.) midterm2023a directory. See also the screenshot above.

Incorrect:

/home/tuhe/Documents/02465students/irlc/exam/midterm2023a/irlc/exam/midterm2023a/question_pid.py This is not correct: The entire irlc-tree from the .zip-file was copied into the midterm2023a folder and the right-most irlc-folder will mess with pythons import-command. The problem is similar to having a file called numpy.py. The solution is to simply remove the inner-most irlc-folder.

Known issues#

You get an error such as:

ModuleNotFoundError: No module named 'irlc.exam.midterm2023a.question_pid'

First check that the file you are trying to run exists (in this case irlc/exam/midterm2023a/question_pid.py). If this is the case, you probably have two copies of the irlc-package, and the file is not located in the one you installed in Step 5: Install the course toolbox and software packages.

Note

on MacOS, assuming you normally run programs with python3, use: python3 -c"import irlc; print(irlc.__path__)"

Solution: To check where you installed irlc, run the following command from the VS Code terminal

python -c"import irlc; print(irlc.__path__)"

On my computer this will print out ['/home/tuhe/Documents/02465students/irlc']. Then make sure the file you are trying to run is located in this directory, i.e. as /home/tuhe/Documents/02465students/irlc/exam/midterm2023a/question_pid.py.

Solutions#

Solutions to the exams will be made available near the end of the semester.