Week 5 — Readings & Resources
Your primary reading is Chapter 5 (in this module). Everything below is the optional, go-deeper layer — pick what helps, skip the rest.
How to use this page
This page has 10 items (4 readings and 6 videos). Allow 72–85 minutes for everything. Each group points back to the matching chapter section and class-session segment, so use the full menu when you want more, or take the quick path below.
Every video here has captions: turn them on with the CC button in the player. The chapter covers the same ideas in text.
Pick-one quick path (16–20 min total)
- Python while loop — Bro Code
- Python while Loop — Programiz
- Python, While Loop Tutorial with Examples — Appficial
① How a while loop repeats
Chapter 5, Section “Repeat with while: the body runs again while the test is True” · Session 1, Segment 1, “The while loop” · Remember: the loop tests its condition at the top of every pass and runs the body again while the test is True.
- Python while loop — Bro Code — a short demo of a loop that keeps asking for a name until one is typed; as you watch, find the line that moves the loop toward its stop. Use it while working through the Week-5 module overview. (video, 4 min) (captions: creator)
- Loops, Python for Beginners 27 of 44 — Microsoft Developer — a short talk on the two ways Python repeats work and when to use each; focus on the while part, and treat the for part as a preview. (video, 5 min) (captions: creator)
- Python while Loop — Programiz — a tutorial whose examples show an infinite loop, a finite one, and a counter that prints 1 to n; read through the break and continue section, and skip the while-else section, which this course does not use. (reading, 8–12 min)
② Counters, totals, and the pass count
Chapter 5, Section “Count and total: counters, accumulators, and the final value” · Session 1, Segment 3, “Counters and accumulators” · Remember: give a counter or a total its starting value before the loop, and expect the counter to end one past the last value that passed.
- Python, While Loop Tutorial with Examples — Appficial — a brief explainer that calls one run of the body an iteration and uses a loop variable to count them; pause before each example ends and predict its last printed value. This builds on Week 4's work with Boolean expressions and comparison operators. (video, 4 min) (captions: automatic)
- Python Tutorial for Beginners 7, Loops and Iterations — Corey Schafer — a calm tour of loops, break, and continue; the for loop part comes first and is next week's topic in Loops II, so skip ahead to the while loop section about six minutes in and watch it to the end, where it shows break and Ctrl+C. (video, 10 min) (captions: automatic)
- Loops, Python concept — Exercism — a compact concept page; read the opening section and the While section, then the part on break, and leave the for, range, and enumerate sections for later weeks. (reading, 5–8 min)
③ Stopping a loop: infinite loops and break
Chapter 5, Section “Leave from the middle: while True, break, and checking a chatbot” · Session 2, Segment 6, “while True and break” · Remember: a loop with no update runs forever, and while True is safe only when a break is sure to be reached.
- While Loops and The Break Statement in Python, Python Tutorial 6 — CS Dojo — a step-by-step lesson on writing while loops and leaving one early with break; trace each example on paper before the answer appears. (video, 13 min) (captions: automatic)
- While Loops, Python Programming Ep. 16 — Kody Simpson — a longer walkthrough of repeating code until a condition changes; watch for the moment a loop never stops, and say which line was missing. (video, 11 min) (captions: automatic)
- How To Construct While Loops in Python 3 — DigitalOcean — a community tutorial; read the While Loop section, where a password loop keeps asking until the right word is typed and the page explains infinite loops and the Ctrl+C key press, and skim the guessing-game program at the end, which uses a module this course has not taught. (reading, 8–12 min)
Optional one-stop reference (free online reference)
- break and continue Statements, The Python Tutorial section 4.4 — Python Software Foundation — the official tutorial's section on leaving a loop early, the course's free reference for every language fact; read the part on break, and note that its examples use for loops, which the chapter has not taught yet. (reading, 4–6 min)
Heads-up (links rot): these point to outside sites that occasionally move or rename pages. If a link ever fails, tell your instructor and use the reference above in the meantime.
Provenance: Built with The Course Maker · samples.thecoursemaker.com