Final Course Project: Automated Expense Tracker
🚀 Project Overview
In this final project, you will build a command-line tool that helps users manage their daily expenses. You will apply Python's concise syntax, versatile data structures, file handling for permanent storage, and OOP to organize the application.
Problem Statement
Managing finances manually is error-prone. Users need a simple way to record their spending, categorize expenses (Food, Rent, Travel), and see a summary of their total monthly expenditure. The data must not be lost when the program closes.
Project Objectives
- Use
Dictionariesto store expense details. - Implement
File I/Oto save/load expenses from a.csvor.jsonfile. - Create an
Expenseclass to model each spending entry. - Use
List Comprehensionsfor fast data filtering and summaries.
Core Features
- Add Expense: Input amount, category, and date.
- View All: Display a list of all recorded expenses in a clean table format.
- Category Summary: Show total spent per category using a dictionary.
- Budget Alert: Notify the user if their total spending exceeds a pre-defined limit.
- Persistent Storage: Automatically load previous data on startup.
Development Steps
- Create an
Expenseclass with an__init__method. - Develop a module
file_handler.pyfor reading/writing data. - Write the main script with a loop and
input()prompts. - Use
try-exceptblocks to handle file errors and invalid number inputs. - Add a "Statistics" function that uses
sum()andlen()to calculate averages.
Evaluation Criteria
| Criteria | Weight |
|---|---|
| Effective use of Pythonic structures (Lists/Dicts/Comprehensions) | 35% |
| Reliable File persistence and error handling | 25% |
| Clean, modular code design (OOP and Functions) | 20% |
| User experience and CLI interface design | 20% |