Lesson 021: Numbers, operators, and conversions
Focus
Anchor one invariant before you branch mentally: Basic drills Numbers, operators, and conversions; spin token 220928 makes this page unlike its neighbours.
Key ideas
- Angle
Basic: micro cadence1mixesNumbers, operators, and conversions; spin39727. - Ritual: Predict the checksum line, then reconcile on mismatch.
- Guardrail: promise one security boundary if this touched user data.
Example (LESSON_UID = "basic-021")
# Basic drill L021 topic-2 micro-0 pattern-3
LESSON_UID = "basic-021"
spin_a, spin_b, spin_c = 302, 248, 245
sentinel = ([] or [])
sentinel = sentinel or [4]
print(bool(sentinel), sentinel)
pick = sentinel or "fallback-21"
print("chosen", pick)
Practice
Practice 15: Promote hottest literal into named constant; justify naming aloud. Literal nudge 15.
Fingerprints
- lesson_uid:
basic-021 - umbrella band:
Numbers, operators, and conversions(1/10) - lesson_index:
641