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

Python Basic — 048: Stress-test packaging hinges with narrow scope centred on `Booleans, comparisons, and truthiness` [895463]

Lesson 048: Booleans, comparisons, and truthiness

Focus

Let the literals expose mistaken assumptions quickly: Basic drills Booleans, comparisons, and truthiness; spin token 422200 makes this page unlike its neighbours.

Key ideas

Example (LESSON_UID = "basic-048")

# Basic drill L048 topic-4 micro-7 pattern-7
LESSON_UID = "basic-048"
spin_a, spin_b, spin_c = 650, 611, 276

src = [((k + 48) * spin_a + 7) % 241 for k in range(4 + 7 % 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 26: Rename locals for domain vocabulary-only; keep behaviour identical. Literal nudge 26.

Fingerprints