python · beginner · ~4h
CLI task list
Build a small tool you would actually use. Support add, list, and complete. Persist to disk. Refuse to crash on a missing file.
Requirements
- add(title) appends a task
- list() returns unfinished tasks first
- complete(id) marks a task done
- Missing storage file is treated as empty, not an error
Skills: Objects & classes · Files & text · Errors & debugging
Starter
todo.py
python · sandboxed in your browser
Output
Run to see output.
Hints
- Give each task an incremental id.
- Write tests for load() when the file is missing.