Concept decomposition and minimal reproductions
Independent Mastery Check — no AI assistance during assessed work. Disclosing any assistance honestly is required, but assisted work is remediation only: complete a fresh unaided check before claiming mastery.
Prerequisites
Completion of Day 01 (object mutation tracer and prediction-experiment-review routine). No advanced Python is assumed.
Learning Objective
Decompose a confusing request into observable concepts, inputs, outputs, constraints, and a minimal reproduction; reuse the Day 01 tracer reasoning rather than duplicating its code.
Instructions
Apply the Day 01 prediction-experiment-review cycle to a new confusing request — do not paste the Day 01 tracer or invent your own task. Work closed-book: (1) write every predicted output before running anything; (2) run the given snippet and record the observed outputs; (3) decompose the result into inputs, expected outputs, constraints, names/objects/mutation/allocation; (4) distill a minimal reproduction; (5) schedule one fresh unaided check. Keep inside the 120-minute budget.
Practice & Prediction Log
A learner reports: "My cleanup helper was supposed to strip the spaces, but the variable still has them afterwards. Why doesn't s.strip() fix s?"
Predict every line of output before running:
s = ' data '
print(repr(s.strip()))
print(repr(s))
s = s.strip()
print(repr(s))
Then decompose the request into: inputs; the learner's expected output; the observed output; the violated constraint; and which concepts are names, objects, mutation, and allocation. Finish by writing the smallest snippet that still demonstrates the effect (your MRE).
Ask two questions of s.strip(): does it mutate the existing string object, or allocate and return a new one? And does a method call rebind the name s without an assignment? Compare with list.append from Day 01, which mutated the shared object.
Worked decomposition:
1. Observed output (verified):
'data' — s.strip() allocates and returns a new string without the spaces
' data ' — s still refers to the original object; nothing rebound it
'data' — only after s = s.strip() does the name refer to the new object
2. Inputs: s = ' data ' and the expectation that calling s.strip() changes s.
3. Expected (wrong) output: 'data' on the second print — the learner assumed mutation.
4. Constraint violated: strings are immutable; strip() cannot alter the object s refers to. A method call by itself never rebinds a name — only assignment (s = ...) does.
5. Names/objects/mutation/allocation: s is a name bound to one string object; strip() allocates a new string object; no mutation occurs anywhere; the original object is unchanged and becomes unreachable only after rebinding. Contrast Day 01: list.append mutated the shared object, so b and a both saw the change.
6. Minimal reproduction (the 3-line core):
s = ' data '
s.strip()
print(repr(s)) # ' data ' — call result discarded, name unchanged7. Fresh check scheduled: predict
name.upper() vs name = name.upper() in two days, unaided.
Pass when, unaided and closed-book: (a) all three printed lines are predicted correctly before execution; (b) the decomposition correctly identifies allocation-not-mutation and that only assignment rebinds the name; (c) the MRE is at most three lines and still reproduces the unchanged-variable effect. Any assistance is remediation only and requires a fresh unaided variant (e.g. `name.upper()`) predicted and verified correctly before mastery is claimed.
Authoritative Source Resources & Provenance
Python Data Model & Mutability Reference
Relevant Section / Range: Section 3.1 & 3.2 (Objects, values, types)
Verified Version & Date: Python 3.12 (Verified: 2026-10-30)
Normative reference on Python identity vs value semantics and mutable vs immutable types without tutorial inaccuracies.
Basic command line and high school reading comprehension
Official documentation is mirrored locally via standard library pydoc and embedded offline lesson explanations if internet access is interrupted.
Compared Candidate Sources & Selection Analysis (4)
High pedagogical clarity for Python fundamentals, but structures mutability around academic lecture pacing rather than immediate hands-on minimal reproductions (MRE).
Strong systems engineering and PyTorch tensor rigor, but assumes advanced Python mastery and PyTorch installed; deferred to Days 30-60 model pretraining.
Strong visual intuition for linear transformations and vector spaces; selected for Days 10-18 mathematics foundations, but not relevant for Day 01 Python object references.
Clear, executable autograd intuition; code is MIT license, but video subtitles have unknown/proprietary distribution rights (prohibiting full-text transcript import). Selected for Days 19-25 autograd implementation with linking-only reuse.
Improving Students' Learning With Effective Learning Techniques: Promising Directions From Cognitive and Educational Psychology
Relevant Section / Range: Psychological Science in the Public Interest 14(1): 4-58; practice testing and distributed practice sections
Verified Version & Date: Psychological Science in the Public Interest, 2013 (Verified: 2026-10-30)
Detailed comparative review rating practice testing and distributed practice as high-utility techniques while rating highlighting and rereading low-utility; anchors the retrieval, correction, and spaced-review design of Days 88-90.
None beyond general academic reading.
Curriculum restates the utility ratings and application conditions in original prose; every task remains runnable offline.
Compared Candidate Sources & Selection Analysis (2)
Important negative result on learning-styles matching but narrower scope; Dunlosky et al. rates a broader set of techniques directly usable for this curriculum.
Strong trade-book synthesis of the same evidence base; the peer-reviewed review is preferred for citation precision and technique-by-technique utility ratings.