Lesson 060: Branching with if, elif, and else
Focus
Assume a reviewer executes this verbatim: Basic drills Branching with if, elif, and else; spin token 520211 makes this page unlike its neighbours.
Key ideas
- Angle
Basic: micro cadence10mixesBranching with if, elif, and else; spin35787. - Ritual: Predict the checksum line, then reconcile on mismatch.
- Guardrail: promise one security boundary if this touched user data.
Example (LESSON_UID = "basic-060")
# Basic drill L060 topic-5 micro-9 pattern-4
LESSON_UID = "basic-060"
spin_a, spin_b, spin_c = 824, 794, 370
score = 175
ladder = []
ladder.append("bronze" if score < (spin_a % 41 + 9) else "silver-ish")
ladder.append("gold" if score > (spin_b % 71 + 5) else "retry")
print(sorted(set(ladder)), score)
Practice
Practice 22: Attach property-style expectations referencing tuple shapes. Literal nudge 22.
Fingerprints
- lesson_uid:
basic-060 - umbrella band:
Branching with if, elif, and else(10/10) - lesson_index:
1952