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

Python Basic — 110: Re-shape packaging hinges with property-test curiosity centred on `Dictionaries map keys to values` [173616]

Lesson 110: Dictionaries map keys to values

Focus

Anchor one invariant before you branch mentally: Basic drills Dictionaries map keys to values; spin token 950186 makes this page unlike its neighbours.

Key ideas

Example (LESSON_UID = "basic-110")

# Basic drill L110 topic-10 micro-9 pattern-7
LESSON_UID = "basic-110"
spin_a, spin_b, spin_c = 120, 347, 333

src = [((k + 110) * spin_a + 9) % 241 for k in range(4 + 9 % 3)]
derived = [v * v if v % 2 == 0 else v + spin_b for v in src]
print("src", src)
print("derived", derived)
print("zip_sum", sum(x + y for x, y in zip(src, derived)))

Practice

Practice 16: Inject a benign off-by-one, observe drift, revert with notes. Literal nudge 16.

Fingerprints