This is a simple Python console-based expense tracker. It demonstrates basic Python concepts such as functions, dictionaries, lists, loops, and user input handling. The program allows adding expenses, viewing a monthly summary, calculating total expenses, and generating a simple invoice.
- Add an expense with category and amount (PKR)
- View a predefined monthly expense summary
- Calculate total expenses
- Generate a basic invoice
- Simple menu-driven interface
-
The script contains multiple functions:
add_expense(amount, category)– Adds and displays an expensemonthly_summary()– Shows category-wise monthly expensestotal_expense()– Calculates total expensesgenerate_invoice(client, amount)– Prints an invoice
-
A
whileloop provides a simple interactive menu
-
Make sure Python 3 is installed.
-
Save the file as
expense_tracker.py. -
Run the program using:
python expense_tracker.py
Expense Added: Food - 500 PKR
Food : 1500
Transport : 800
Bills : 2500
Total Expense: 2500
Invoice Generated
Client: Ali Khan
Amount: 5500
- Currency used: PKR
- Expense values are currently hardcoded for demonstration purposes
- Store expenses dynamically
- Save data to a file or database
- Add date-wise expense tracking
- Improve input validation
This project is for learning and practice purposes.