Repetition, then decomposition — the two powers that turn scripts into
programs. Week 5 carries the course’s first flagship project.
← Weeks 1–4 · Roadmap home · Weeks 9–12 →
Week 5 — Loops I — 🏁 Project 1
Session 5.1 — while, trace tables, and sentinels
Part
Details
Prerequisites
Week 4 — decisions and compound conditions fluent
Learning objectives
write while loops with correct entry/update/exit; trace loops in a table before running; build sentinel-controlled and validation loops; recognize the infinite-loop shapes on sight
Concepts
while, accumulators, counters, sentinel values, input-controlled loops, infinite loops and their causes, dry-run tables
☐ Project 1 submitted to yourself: all milestones, test plan passed, rubric self-scored ≥ Proficient ☐ re-prompt loop written from memory ☐ W05 quiz ≥ 90%
Week 6 — Loops II
Session 6.1 — for, break, and continue
Part
Details
Prerequisites
Week 5 — while and sentinels fluent
Learning objectives
write counting for loops over arbitrary ranges; choose between while/for/do-while by the problem’s shape; control flow with break and continue
☐ two patterns + one table printed without reference ☐ digit-peel loop written from memory ☐ W06 quiz ≥ 90%
Week 7 — Functions I
Session 7.1 — The function machine
Part
Details
Prerequisites
Week 6 — loops fluent
Learning objectives
define, declare, and call functions; distinguish parameters from arguments; write void and value-returning functions; explain why decomposition beats one giant main
Concepts
function declaration/definition/call, parameters vs arguments, return values, void, prototypes, call flow
☐ two call traces drawn ☐ 5 function problems attempted ☐ 2 labs done
Session 7.2 — Scope, lifetime, and decomposition
Part
Details
Prerequisites
Session 7.1
Learning objectives
explain local vs global scope and lifetime; write multi-function programs where main only coordinates; refactor an existing loop-heavy program into functions
Concepts
local variables, global variables (and why the course bans new ones), scope shadowing, top-down decomposition, main-as-coordinator
☐ swap-by-reference written from memory ☐ one multi-out-param function designed and tested
Session 8.2 — Overloading, default arguments, and refactoring
Part
Details
Prerequisites
Session 8.1
Learning objectives
overload functions by parameter list; use default arguments; test functions with drivers and stubs; complete a behavior-preserving refactor of a full program
Concepts
function overloading, default arguments, drivers, stubs, testing functions, refactoring discipline