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

Python Intermediate — 148: Budget closure capture with fresh literals centred on `datetime, naive vs UTC-aware instincts` [332580]

Lesson 148: datetime, naive vs UTC-aware instincts

Focus

Let the literals expose mistaken assumptions quickly: Intermediate drills datetime, naive vs UTC-aware instincts; spin token 1252648 makes this page unlike its neighbours.

Key ideas

Example (LESSON_UID = "intermediate-148")

# Intermediate drill L148 topic-14 micro-7 pattern-4
LESSON_UID = "intermediate-148"
spin_a, spin_b, spin_c = 920, 922, 45

score = 164
ladder = []
ladder.append("bronze" if score < (spin_a % 41 + 7) else "silver-ish")
ladder.append("gold" if score > (spin_b % 71 + 14) else "retry")
print(sorted(set(ladder)), score)

from pathlib import Path
import tempfile

with tempfile.TemporaryDirectory() as scratch:
    target = Path(scratch) / "scratch-148.txt"
    snap = [161, 101, 41, 972, 912, 852]
    target.write_text("\n".join(str(x) for x in snap), encoding="utf-8")
    print("scratch_bytes", target.stat().st_size, "rolling", sum(snap) % (45 + 131))

Practice

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

Fingerprints