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

Python Basic — 047: Snapshot truthy shells with observability hooks centred on `Booleans, comparisons, and truthiness` [583801]

Lesson 047: Booleans, comparisons, and truthiness

Focus

Slow tempo wins; narrate checkpoints aloud: Basic drills Booleans, comparisons, and truthiness; spin token 394219 makes this page unlike its neighbours.

Key ideas

Example (LESSON_UID = "basic-047")

# Basic drill L047 topic-4 micro-6 pattern-5
LESSON_UID = "basic-047"
spin_a, spin_b, spin_c = 791, 242, 86

hop = (spin_a % 13) + 6 + 4
total = (spin_b + 47 * spin_c) % 5003
while hop < (908 % 61) + 30:
    total += hop
    hop = hop * (614 % 5 + 1) % (spin_a % 127 + 6 + 17)
    if total % (spin_b % 17 + 6 + 11) == 0:
        break
print(total, hop)

Practice

Practice 14: Enumerate three pytest markers you'd decorate if this lived in CI. Literal nudge 14.

Fingerprints