⚠️ Disclaimer: These notes were generated from a live lecture transcript compiled with Claude Sonnet 4.6. Some code examples have been reconstructed from verbal descriptions and may contain minor inaccuracies. Q&A entries labelled (Implicit) are inferred from context rather than explicit exchanges. Always cross-reference with official course materials on Canvas and the Ed platform.


41039 Programming 1 — Week 4 Lecture Notes

Topic: Repetition (Loops), Arrays, Lists, Tuples & Record Classes

Autumn 2026 | Lecturer: Dr. Luke Mathieson


0. Administrative Notes


1. Course Roadmap — Where We Are

The course is built around a triad of basic programming language constructs:

Week Topic Description
Week 2 State Variables, types, memory, call stack, call frames
Week 3 Decisions if statements, switch statements — choosing code to run based on state
Week 4 Repetition Loops — repeating code based on a condition

These three concepts form the complete foundation of imperative programming. The lecturer notes:

“Anyone who goes off and learns assembly code will find that basically these are the only three things you can do.”

State, decision, and repetition are deeply intertwined:


2. What Is Repetition?