Lesson 077: for loops, range(), and iteration habits
Focus
This page is deliberate repetition with new literals: Basic drills for loops, range(), and iteration habits; spin token 691248 makes this page unlike its neighbours.
Key ideas
- Angle
Basic: micro cadence7mixesfor loops, range(), and iteration habits; spin72477. - Ritual: Swap one benign literal twice to see binding effects.
- Guardrail: pick the budget that keeps this rehearsal honest.
Example (LESSON_UID = "basic-077")
# Basic drill L077 topic-7 micro-6 pattern-12
LESSON_UID = "basic-077"
spin_a, spin_b, spin_c = 649, 719, 317
from io import StringIO
buf = StringIO()
rounds = 3 + 6 % 5
for idx in range(rounds):
buf.write(f"seg-{idx}-{(idx * 77 + 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 76 aloud. Literal nudge 13.
Fingerprints
- lesson_uid:
basic-077 - umbrella band:
for loops, range(), and iteration habits(7/10) - lesson_index:
2475