--- id: course-da-eda-l02 type: course title: "Challenge 02: Define the answer first" summary: "Sketch results.json — keys, types, rounding — before letting the agent write eda.py." lang: en-US content_version: 1 status: reviewed reviewed_on: 2026-09-12 hints: - title: "What this checkpoint tests" body: "Defining the answer before generating it: sketch `results.json` — keys, types, rounding — before letting the agent write `eda.py`." - title: "Contract first" body: "Decide what `total_revenue` rounding means, what `revenue_by_region` keys look like, and that `rows_total` equals input rows — the suite compares exact numbers." - title: "When you are done" body: "Your sketch names every key in `results.json` and its source column." --- # Challenge 02: Define the answer first **Gate:** self-attested · **Points:** 10 Write down the shape of `results.json` before implementing anything: which keys, which types, which rounding rules. The contract in `TASK.md` defines the *form* — you decide what "correct" means for each value before you let the agent generate code. This is the anti-pattern this course exists to kill: "the agent wrote code, it printed something, ship it." EDA only counts if the numbers are *checkable*. **Checkpoint:** you have a written list of the expected keys and you can explain what each one means. Self-attested; record via `python verify.py`.