Practice ยท 1 of 3
Milestone 1: Storage and Repository
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.
Difficulty: advanced
Press Submit to check your solution.
Back to lesson: Practice: Capstone Milestones