{% import macros as m with context %} .. role:: python(code) :language: python .. role:: bash(code) :language: bash .. _exam: {% if show_oral_exam_info %} August {{ year}} re-exam practicals ==================================================================================================================== .. note:: :class: margin The oral format is due to a low number of enrolled students. The {{year }} August re-exam in will be oral. For scheduling/dates please see the DTU learn page for {{year}} semester. Please make sure you are enrolled for the re-exam in your study planner and that you have access to the DTU Learn group. The following document contains the practical information including a list of exam questions and how to (potentially) hand in new versions of the reports. - :fas:`bell` :asset:`02465oral_exam_instructions.pdf` Exam practicals (Ordinary spring exam) ---------------------------------------------------------------------------------------------------------- *(This section described the ordinary (May) exam. Please see the previous section for the August re-exam information)* {% else %} Exam practicals ===================================================================================================================== {% endif %} 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: - :asset:`02465exam_instructions.pdf` - :asset:`Exam QA slides `. A recording of the QA session can be found on DTU Learn. Installing and testing the code during the exam ---------------------------------------------------------------------------------------------------------------------- To work on the programming exercises, first make sure you have a :ref:`working installation ` of the course software on your computer. During the exam you will download a :file:`.zip` file. You can find three examples here: `https://gitlab.compute.dtu.dk/02465material/02465students `__. .. tip:: :class: margin You can test this procedure now using the :file:`irlc/exam/exam2023spring` exam set. The :file:`.zip` file has the same structure as your student folder. Move the directory :file:`irlc/exam/exam2024spring` (in the :file:`.zip`-file) to the directory with the same name on your computer, i.e. :file:`irlc/exam/exam2024spring`. This is much easier explained using a video: {{ m.embed('https://panopto.dtu.dk/Panopto/Pages/Viewer.aspx?id=1abb13e2-c228-49b4-bb07-b16401196762', 'Exam installation procedure (updated for 2024)', True) }} .. note:: :class: margin The :file:`.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: - :gitref:`../irlc/exam/midterm2023a` - :gitref:`../irlc/exam/midterm2023b` - :gitref:`../irlc/exam/exam2023spring` .. warning:: Internet access will be restricted and therefore you cannot use :bash:`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 :file:`.zip`-file to your computer your file explorer in VS Code should look similar to this: .. image:: ../shared/figures/vs_install_exam.png :width: 900 :alt: The VSCode editor after the exam files have been moved over. The spring 2023 exam is shown here. .. warning:: :class: full-width When you copy the files, be careful to preserve the directory structure. As an example, suppose my exercises are in the folder: :file:`/home/tuhe/Documents/02465students` The following shows a correct/incorrect location of the :file:`question_pid.py` file from the midterm test exam: Correct: :file:`/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.) :file:`midterm2023a` directory. See also the screenshot above. Incorrect: :file:`/home/tuhe/Documents/02465students/irlc/exam/midterm2023a/irlc/exam/midterm2023a/question_pid.py` This is **not** correct: The entire :file:`irlc`-tree from the :file:`.zip`-file was copied into the :file:`midterm2023a` folder and the right-most :file:`irlc`-folder will mess with pythons :python:`import`-command. The problem is similar to having a file called :file:`numpy.py`. The solution is to simply remove the inner-most :file:`irlc`-folder. Known issues ---------------------------------------------------------------------------------------------------------- **You get an error such as:** .. code-block:: bash ModuleNotFoundError: No module named 'irlc.exam.midterm2023a.question_pid' First check that the file you are trying to run exists (in this case :file:`irlc/exam/midterm2023a/question_pid.py`). If this is the case, you probably have two copies of the :python:`irlc`-package, and the file is not located in the one you installed in :ref:`installpackages`. .. note:: :class: margin on MacOS, assuming you normally run programs with :bash:`python3`, use: :bash:`python3 -c"import irlc; print(irlc.__path__)"` **Solution**: To check where you installed :python:`irlc`, run the following command from the VS Code terminal .. code-block:: bash python -c"import irlc; print(irlc.__path__)" On my computer this will print out :python:`['/home/tuhe/Documents/02465students/irlc']`. Then make sure the file you are trying to run is located in this directory, i.e. as :file:`/home/tuhe/Documents/02465students/irlc/exam/midterm2023a/question_pid.py`. Solutions ---------------------------------------------------------------------------------------------- Check the solutions folder on gitlab: - :gitref:`../irlc/exam/midterm2023a/solution` - :gitref:`../irlc/exam/midterm2023b/solution` - :gitref:`../irlc/exam/exam2023spring/solution`