Course syllabus

Course-PM

DAT171 Object-oriented programming in Python lp3 VT26 (7.5 hp)

Course is offered by the department of Electrical Engineering

All course communication is in English.

The course is designed and delivered on campus so you are strongly encouraged to attend the sessions, but recorded lectures are posted in Chalmers Play (up to two business days later) to cover unplanned situations (such as sickness).

This page was last updated 2026-01-08.

Contact details

The course administration reserves the Fridays for activities other than course work. We will answer canvas messages and the discussion forum during business hours on Monday-Thursday.

Examiner: Paolo Monti, mpaolo@chalmers.se tel. 772 60 27
Lecturer and course responsible: Carlos Natalino, carlos.natalino@chalmers.se, 772 60 26 - prefer message on canvas - github.com/carlosnatalino
Assistant Lecturer: Seyed Navid Elyasi

Teaching assistants:

  • Sai Vikranth Pendem
    • https://github.com/saivikranthp
  • Bingcheng Chen
    • https://github.com/chenbin234

Student representatives: to be announced

Course purpose

The aim of the course is to provide the students with good opportunities to develop a fundamental understanding of object-oriented programming, particular in Python and how to use standard libraries for development of  graphical user interfaces, numerical computations and plotting.

Further details about the course can be found here: https://www.chalmers.se/en/education/your-studies/find-course-and-programme-syllabi/course-syllabus/DAT171/?acYear=2025%2F2026

Schedule

Always check TimeEdit for the updated schedule.

Only use the following backup PDF file (as of 2026-01-08) if TimeEdit is not available: TimeEdit_DAT171_50_VT26_55153_Object-oriented_programming_in_Python_2026-01-19_2026-03..._2026-01-05_11_24.pdf

Course literature

[1] C. Horstmann: Python for everyone 3rd ed., ISBN: 978-1-119-63829-2 (optional)
[2] Python tutorial: https://docs.python.org/3.13/tutorial/
[3] Python 3 course: http://www.python-course.eu/python3_course.php
[4] NumPy & SciPy references: http://docs.scipy.org/doc/
[5] Matplotlib reference: https://matplotlib.org/stable/users/index.html
[6] PyQt 6 reference: https://zetcode.com/pyqt6/ and https://doc.qt.io/qt-6/
[7] NumPy for Matlab users: https://numpy.org/doc/stable/user/numpy-for-matlab-users.html
[8] Pandas: https://pandas.pydata.org/docs/
[9] Lecture notes (from within Chalmers or using Chalmers VPN): https://onu1.s2.chalmers.se/notes/
[10] Test-Driven Development with Python, by Harry Percival, 2nd Edition, 2017, ISBN: 978-1491958704. (optional) You can read it for free on the book website: https://www.obeythetestinggoat.com/ 

All references to chapters and sections in the course material will also refer to free online material as well.

The lecture notes and links above can be easily used with tools for students with disabilities, or simply any Chalmers student who wants a reader for the textual material. More information about these tools can be found here: https://www.chalmers.se/en/education/student-support/disability-study-support/#Software-adapted-to-students-with-disabilities:~:text=Software%20adapted%20to%20students%20with%20disabilities 

If you prefer to use edited books, the following books are recommended reference reading for those who want to further develop their knowledge.

  1. Beginner (covers prerequisite knowledge): Python från början, by Jan Skansholm, 2024, ISBN: 9789144187617.

  2. Beginner (covers prerequisite knowledge): Introducing Python: Modern Computing in Simple Packages, by Bill Lubanovic, 2nd edition, 2020, ISBN: 978-1492051367.

  3. Intermediate (covers new knowledge introduced in the course): Test-Driven Development with Python, by Harry Percival, 2nd Edition, 2017, ISBN: 978-1491958704.
  4. Intermediate (covers new knowledge introduced in the course): Robust Python, by Patrick Viafore, , 2021, ISBN: 9781098100667.

Software

We expect students to use their own computers throughout the course. During the lab sessions, lab computers can also work for you. Further instructions will be published during the first week of the course.

Course prerequisites, learning outcomes, and content

This is not a beginner's programming course. It is designed to be the second course to be taken. To fully take advantage of the course, you are expected to have good working knowledge of basic programming structures such as variables, conditionals, loops and functions in any programming language (for example Matlab).
Students who feel they lack sufficient knowledge in programming can have a look at https://www.learnpython.org (at least the “Learn the Basics” part) and/or books 1 and 2 above.

Detailed information can be found here: https://www.chalmers.se/en/education/your-studies/find-course-and-programme-syllabi/course-syllabus/DAT171/?acYear=2025%2F2026

Course design

The course is given in the form of lectures (Mondays afternoons) where we discuss and have time for Q&A regarding the week's content.

Lab sessions (Thursdays mornings) are self-learning sessions where TAs are available to take questions.

The time budget is about 200 work hours per student, where 32 hours are spent on lectures, 48 hours of tutored computer sessions. The assignments are worth 1 hp each and should represent ~26 hours of work per student. Naturally, we expect variations in time effort among students depending on a number of factors.

Examination form

Examination is in the form an exam where you write solutions (code) to given tasks on provided computers. These solutions are graded.

To pass on the course, the three compulsory computer assignments must have been completed and approved.

The exam will not contain anything on the GUI (5 hours would not be sufficient).

Examination dates: Check the course page for the 2025/2026 academic year: https://www.chalmers.se/en/education/your-studies/find-course-and-programme-syllabi/course-syllabus/DAT171/?acYear=2025%2F2026

Note! Make sure to register for the exam!

Internet access will be prevented during the exam, but the PDF or website version of the Python 3-, SciPy-, NumPy-, Pandas, and Matplotlib manuals as well as the Lecture Notes will be available on the computers.

The exam will consist of 4-5 questions and will be determining the final grade of the course.

Maximum total is 25 points. For a passing grade 10 points is required, for grade four 15 points is required, and for grade five 20 points is required. The examination time is 5 hours.

Old exams will be available on the course homepage.

Course evaluation

The course will be evaluated at 2 occurrences throughout the course. In addition, there will be a course survey for all students at the end of the course. The course board representatives are listed in the contact details section of this syllabus.

Assignments

There will be 3 compulsory assignments, which covers most of the content of the course. Each assignment will be built based on what was done in the previous one. The assignments will be performed in groups of two students. Groups with more than two students will not be allowed, but you are allowed to do the assignments by yourself if you prefer.

In addition, there will be practice problems available that are not compulsory, but come highly recommended.

Please note dates for handing in final corrections of the assignments. 

Assignment 1:

  • Getting familiar with Python
  • Reading files
  • Using NumPy for numerics
  • Using Pandas for data manipulation
  • Using more advanced data structures
  • Matplotlib

Assignment 2:

  • Creating classes
  • Creating a library
  • Documentation

Assignment 3:

  • Interactive programs
  • Creating a GUI with PyQt

Knowledge checklist

Before the exam, please go through the checklist to know you have mastered the components of the course!

This list tries to be as detailed as possible.

  • Python language
    • Built in documentation: help(...)
    • Being able to look up what you need in the reference!
    • Variables
    • pass
    • Conditionals: if elif else
    • Looping: for, while, continue, break
    • with as
    • Boolean operators: and, or, in, is, not, ==, !=, <>, <, >, >=, <=, 
    • Bit operators: >>, <<, ~, ^, |, &
    • Arithmetic operators:  +, -, *, /, %, **, //
    • Assignment operators: =, +=, -=, *=, /=, %=, **=, //=
    • Functions
    • Lambda functions / anonymous functions
    • List/set/dictionary comprehensions
    • Exceptions: try, raise, except, finally 
    • Libraries
    • Common errors
    • Documentation with PyDoc
    • *args (e.g., foo(*x) ➔ foo(x[0], x[1], x[2]) ) and **args
    • Common structures
      • Strings
      • Lists (indexing, slicing)
      • Tuples
      • Sets
      • Dictionaries, del
    • Object-oriented programming
      • Classes
      • Inheritance and polymorphism
      • Constructors and destructors
      • Abstract methods and decorators
      • Operator overloading
  • NumPy
    • Being able to look up what you need in the reference!
    • numpy.array
    • numpy.linalg
  • SciPy
    • Being able to look up what you need in the reference!
    • scipy.spatial
    • scipy.sparse.csgraph
  • Matplotlib
    • Being able to look up what you need in the reference!
    • Being able to create line and bar plots, change the axes titles, line style, markers

Changes made since the last occasion

A summary of changes made since the last occasion.

Course summary:

Course Summary
Date Details Due