Lesson 079: for loops, range(), and iteration habits
Focus
Prints are breadcrumbs, not ornamentation: Basic drills for loops, range(), and iteration habits; spin token 694052 makes this page unlike its neighbours.
Key ideas
- Angle
Basic: micro cadence9mixesfor loops, range(), and iteration habits; spin46495. - Ritual: Predict the checksum line, then reconcile on mismatch.
- Guardrail: separate demo-trick from shipping discipline verbally.
Example (LESSON_UID = "basic-079")
# Basic drill L079 topic-7 micro-8 pattern-12
LESSON_UID = "basic-079"
spin_a, spin_b, spin_c = 607, 319, 909
from io import StringIO
buf = StringIO()
rounds = 3 + 8 % 5
for idx in range(rounds):
buf.write(f"seg-{idx}-{(idx * 79 + spin_b) % 997}\n")
buf.seek(0)
dump = buf.read()
print("lines", dump.count("\n"))
print("peek", dump.splitlines()[0] if dump else "<empty>")
Practice
Practice 13: Verbal-diff this against lesson 78 aloud. Literal nudge 13.
Fingerprints
- lesson_uid:
basic-079 - umbrella band:
for loops, range(), and iteration habits(9/10) - lesson_index:
2553