Skip to main content

Practice · 1 of 3

Milestone 1: Storage and Repository

CHALLENGE
Difficulty: advanced+25 XP

Build init_tasks(conn) (create the tasks table from the brief) and TaskRepository(conn) with add(title) -> int, get(task_id) -> dict | None ({id, title, done}), complete(task_id) -> bool, list_open() -> list[dict] (done=0, by id). Duplicate titles raise TaskError('duplicate title'). ALL SQL parameterized.

Back to lesson: Practice: Capstone Milestones