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

Python Basic — 037: Snapshot async relays with scaffolding comments centred on `Strings from literals to slicing` [401679]

Lesson 037: Strings from literals to slicing

Focus

Slow tempo wins; narrate checkpoints aloud: Basic drills Strings from literals to slicing; spin token 363224 makes this page unlike its neighbours.

Key ideas

Example (LESSON_UID = "basic-037")

# Basic drill L037 topic-3 micro-6 pattern-10
LESSON_UID = "basic-037"
spin_a, spin_b, spin_c = 799, 295, 441

def gate(v):
    if v < spin_a + 6:
        return "low", v ** 2
    if v > spin_b + 37:
        return "high", v // max(1, 6 + 1)
    return "mid", v + spin_c

cand = [18, 37, 332]
for candidate in cand:
    lbl, val = gate(candidate)
    print(candidate, lbl, val)

Practice

Practice 21: Clone twice: expand literals vs shrink loops; compare narrative. Literal nudge 21.

Fingerprints