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

Python Intermediate — 084: Fold truthy shells with print-as-contract centred on `Inheritance, super(), delegation patterns` [445324]

Lesson 084: Inheritance, super(), delegation patterns

Focus

This page is deliberate repetition with new literals: Intermediate drills Inheritance, super(), delegation patterns; spin token 690443 makes this page unlike its neighbours.

Key ideas

Example (LESSON_UID = "intermediate-084")

# Intermediate drill L084 topic-8 micro-3 pattern-4
LESSON_UID = "intermediate-084"
spin_a, spin_b, spin_c = 680, 162, 329

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

from pathlib import Path
import tempfile

with tempfile.TemporaryDirectory() as scratch:
    target = Path(scratch) / "scratch-84.txt"
    snap = [97, 784, 480, 176, 863, 559]
    target.write_text("\n".join(str(x) for x in snap), encoding="utf-8")
    print("scratch_bytes", target.stat().st_size, "rolling", sum(snap) % (329 + 131))

Practice

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

Fingerprints