Mini Project

Expense Tracker with Reports

Expense Tracker with Reports

Build a CLI expense tracker that logs transactions, categorizes spending, and generates multiple report views. Support adding expenses/income, monthly summaries, category breakdowns, top expense detection, and balance tracking. Use dataclasses for models, datetime for date handling, and dict-based aggregation. Learn dataclasses, datetime, enum, type hints, and report generation.

EditorPython · JSX
PreviewUpdates on Run Tests
Loading preview…
Tests
Should import and use Enum
Should define Transaction dataclass
Should use datetime for date parsing
Should use type hints in function signatures
Should use defaultdict for aggregation
Should use list comprehension with condition for filtering
Should use sorted() with key lambda for ranking
Should use sum() with generator for totals