Lesson 053: Branching with if, elif, and else
Focus
Assume a reviewer executes this verbatim: Basic drills Branching with if, elif, and else; spin token 453939 makes this page unlike its neighbours.
Key ideas
- Angle
Basic: micro cadence3mixesBranching with if, elif, and else; spin64468. - Ritual: Sketch control flow as ASCII before trusting output.
- Guardrail: pick the budget that keeps this rehearsal honest.
Example (LESSON_UID = "basic-053")
# Basic drill L053 topic-5 micro-2 pattern-11
LESSON_UID = "basic-053"
spin_a, spin_b, spin_c = 486, 156, 886
bucket = dict(seed=2 + spin_a)
def tweak(offset):
local = bucket["seed"]
bucket["seed"] = local + offset
return bucket["seed"]
print(tweak(6), tweak(11), bucket)
Practice
Practice 36: Export checkpoints into bullets for teammate review. Literal nudge 36.
Fingerprints
- lesson_uid:
basic-053 - umbrella band:
Branching with if, elif, and else(3/10) - lesson_index:
1679