Programming 1 (41039) — Week 3 Lecture Notes

Topic: Decision / Branching

Lecturer: Dr. Luke Mathieson | Semester: Autumn 2026


⚠️ Disclaimer

These notes were generated from a live lecture transcript and compiled using Claude Sonnet 4.6. While the conceptual content, explanations, and Q&A answers have been verified against the transcript and are accurate, please note the following:


Table of Contents


1. Course Context & The Three Elements of Programming

The Three Fundamental Elements

Every programming language — to be “up and running” — requires exactly three elements:

Element Also Called What It Is
State Variables The current values stored in memory
Decision Branching / Conditional Choosing which code to execute
Iteration Looping / Repetition / Recursion Repeating code

Week coverage:

“After next week, you have all of the basic elements that you need to create a fully working programming language.”

What You Could Do With Just These Three

With only state + decision + iteration, you could write something that looks like assembly language. Assembly has:

Everything else in modern programming languages is built on top of these three elements to make code easier to read, write, and debug — not to add fundamentally new capability.


2. Linear Flow — What We Had Before