← Curriculum track ← Learn hub
Quanta GenAI Curriculum · Python · Basic

Python Basic — 146: Nudge hypothesis stubs with pattern-match taste centred on `Scope, locals, and shadowing pitfalls` [29396]

Lesson 146: Scope, locals, and shadowing pitfalls

Focus

Treat the excerpt as executable notes: Basic drills Scope, locals, and shadowing pitfalls; spin token 1220810 makes this page unlike its neighbours.

Key ideas

Example (LESSON_UID = "basic-146")

# Basic drill L146 topic-14 micro-5 pattern-4
LESSON_UID = "basic-146"
spin_a, spin_b, spin_c = 794, 171, 372

score = 176
ladder = []
ladder.append("bronze" if score < (spin_a % 41 + 5) else "silver-ish")
ladder.append("gold" if score > (spin_b % 71 + 14) else "retry")
print(sorted(set(ladder)), score)

Practice

Practice 19: Attach property-style expectations referencing tuple shapes. Literal nudge 19.

Fingerprints