Python object model: Difference between revisions

From 22116
Jump to navigation Jump to search
(Created page with "__NOTOC__ {| width=500 style="font-size: 10px; float:right; margin-left: 10px; margin-top: -56px;" |Previous: Regular expressions |Next: Programme |} == Required course material for the lesson == Powerpoint: [https://teaching.healthtech.dtu.dk/material/22116/22116_13-Objects.ppt Object model and complex data]<br> Resource: Example code - Dicts<br> == Subjects covered == * Python objects * Identity * Mutable vs immutable * Complex data * Exam format == Exer...")
 
 
(2 intermediate revisions by the same user not shown)
Line 6: Line 6:
== Required course material for the lesson ==
== Required course material for the lesson ==
Powerpoint: [https://teaching.healthtech.dtu.dk/material/22116/22116_13-Objects.ppt Object model and complex data]<br>
Powerpoint: [https://teaching.healthtech.dtu.dk/material/22116/22116_13-Objects.ppt Object model and complex data]<br>
Resource: [[Example code - Dicts]]<br>
Resource: [[Example code - Data]]<br>


== Subjects covered ==
== Subjects covered ==
Line 16: Line 16:


== Exercises to be handed in ==
== Exercises to be handed in ==
'''Important - read this before starting'''<br>
This exercise set will be similar to the format of the exam. The content will obviously be different.<br>
You have to download this python file. It contains some frame work code, but mostly some unfinished functions.
Each exercise is about finishing one of the functions in the file. You can write the function directly in the python file, or use VScode or other editor to write it, but then it has to be copied over to the python file. You must hand in the finished python file, '''not''' a .ipynb file.<br>
Inability to understand or do this will make you fail the exam, so it is worth spending some time on the process.


== Exercises for extra practice ==
== Exercises for extra practice ==

Latest revision as of 11:06, 1 October 2025

Previous: Regular expressions Next: Programme

Required course material for the lesson

Powerpoint: Object model and complex data
Resource: Example code - Data

Subjects covered

  • Python objects
  • Identity
  • Mutable vs immutable
  • Complex data
  • Exam format

Exercises to be handed in

Important - read this before starting
This exercise set will be similar to the format of the exam. The content will obviously be different.
You have to download this python file. It contains some frame work code, but mostly some unfinished functions. Each exercise is about finishing one of the functions in the file. You can write the function directly in the python file, or use VScode or other editor to write it, but then it has to be copied over to the python file. You must hand in the finished python file, not a .ipynb file.
Inability to understand or do this will make you fail the exam, so it is worth spending some time on the process.

Exercises for extra practice