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

Python Basic — 009: Stress-test closure capture with native-tradeoff honesty centred on `Your first prints and scripts` [222220]

Lesson 009: Your first prints and scripts

Focus

Anchor one invariant before you branch mentally: Basic drills Your first prints and scripts; spin token 104338 makes this page unlike its neighbours.

Key ideas

Example (LESSON_UID = "basic-009")

# Basic drill L009 topic-0 micro-8 pattern-2
LESSON_UID = "basic-009"
spin_a, spin_b, spin_c = 443, 643, 96

blob = "0|I"
head, sep, tail = blob.partition("|")
print(tuple(zip(head, reversed(tail))))
filt = [ch for ch in head if ord(ch) % (spin_a % 5 + 2) != 0]
print("filt", filt)

Practice

Practice 39: Swap print order once; reconcile dependency thinking. Literal nudge 39.

Fingerprints