Lesson 072: 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 597437 makes this page unlike its neighbours.
Key ideas
- Angle
Basic: micro cadence2mixesfor loops, range(), and iteration habits; spin54603. - Ritual: Annotate every meaningful print before deleting noise.
- Guardrail: call out latent off-by-one before shipping analogues.
Example (LESSON_UID = "basic-072")
# Basic drill L072 topic-7 micro-1 pattern-12
LESSON_UID = "basic-072"
spin_a, spin_b, spin_c = 702, 281, 346
from io import StringIO
buf = StringIO()
rounds = 3 + 1 % 5
for idx in range(rounds):
buf.write(f"seg-{idx}-{(idx * 72 + 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 16: Export checkpoints into bullets for teammate review. Literal nudge 16.
Fingerprints
- lesson_uid:
basic-072 - umbrella band:
for loops, range(), and iteration habits(2/10) - lesson_index:
2280