AIPLAB — Adaptive & Integrated Photonics Lab

Education - Introduction to Programming

PHOT 110 Introduction to Programming

The original lectures were given over 14 weeks (2 hours theory + 2 hours practice) during the spring semester of 2023-2024, please see also the syllabus below. The theory slides were here restructured to reduce any repetition and references to in-class exercises. Many errors likely remained however and comments are welcome.

Exams (and example exams) of both the final and midterm exams are provided further down. If you are a student using the exam examples to study, be aware that the course can undergo changes over the years.

Lecture materials

Lecture Topics Slides Tasks
1 Introduction to computers & algorithms (pdf)
2 Python basics (pdf) (html)
3 Control flow, branching, lists, and iterators (pdf) (html)
4 Iteration, sequences, strings, and arrays (pdf) (html) Arrays (pdf), Plots (pdf)
5 Functions (pdf) (html) (pdf)
6 Input/Output and error-handling (pdf) (html) (pdf)
7 Modules & script documentation (pdf) (html) (pdf)
8 Arrays, vectors & linear algebra (pdf) (html) (pdf)
9 Plots and visualizations (pdf) (html)
10 Data, Dictionaries, and Pandas (pdf) (html)
11 Classes, class hierarchy, special methods (pdf) (html)

Additional course materials

Content File(s)
Script (.py) solutions of in-class exercises (zip)
Sample files for exercises (lecture 11) (zip)
First project (topics description) (pdf)
Second project (topics description) (pdf)

Exam questions & solutions

These are the questions and solutions of the midterm and the final exam (and retake opportunities) of the Spring semester of 2023-2024
Exam name Questions Solutions
Midterm exam (pdf) (pdf)
Midterm exam (retake) (pdf) (pdf)
Midterm exam (2nd retake) (pdf) (pdf)
Example final exam (pdf) (pdf)
Final exam (pdf) (pdf)
Final exam (retake) (pdf) (pdf)