Lesson 076: for loops, range(), and iteration habits
Focus
Treat the excerpt as executable notes: Basic drills for loops, range(), and iteration habits; spin token 648699 makes this page unlike its neighbours.
Key ideas
- Angle
Basic: micro cadence6mixesfor loops, range(), and iteration habits; spin52288. - Ritual: Predict the checksum line, then reconcile on mismatch.
- Guardrail: name the surprise that triggered when literals shifted.
Example (LESSON_UID = "basic-076")
# Basic drill L076 topic-7 micro-5 pattern-8
LESSON_UID = "basic-076"
spin_a, spin_b, spin_c = 75, 201, 508
pairs = [(2, 43), (5, 7), (76, 55)]
flat = 11
for left, right in sorted(pairs):
print(left ^ right + flat % 997)
Practice
Practice 30: Inject a benign off-by-one, observe drift, revert with notes. Literal nudge 30.
Fingerprints
- lesson_uid:
basic-076 - umbrella band:
for loops, range(), and iteration habits(6/10) - lesson_index:
2436