Lesson 047: Booleans, comparisons, and truthiness
Focus
Slow tempo wins; narrate checkpoints aloud: Basic drills Booleans, comparisons, and truthiness; spin token 394219 makes this page unlike its neighbours.
Key ideas
- Angle
Basic: micro cadence7mixesBooleans, comparisons, and truthiness; spin47990. - Ritual: Mirror the snippet with reversed iteration order verbally.
- Guardrail: call out latent off-by-one before shipping analogues.
Example (LESSON_UID = "basic-047")
# Basic drill L047 topic-4 micro-6 pattern-5
LESSON_UID = "basic-047"
spin_a, spin_b, spin_c = 791, 242, 86
hop = (spin_a % 13) + 6 + 4
total = (spin_b + 47 * spin_c) % 5003
while hop < (908 % 61) + 30:
total += hop
hop = hop * (614 % 5 + 1) % (spin_a % 127 + 6 + 17)
if total % (spin_b % 17 + 6 + 11) == 0:
break
print(total, hop)
Practice
Practice 14: Enumerate three pytest markers you'd decorate if this lived in CI. Literal nudge 14.
Fingerprints
- lesson_uid:
basic-047 - umbrella band:
Booleans, comparisons, and truthiness(7/10) - lesson_index:
1515