A beginner Python expense tracker that adds up your spending in real-time. Built as Project 2 of my Python internship at DecodeLabs.
A simple command-line expense tracker built with Python. You enter your expenses one by one, and the program keeps a running total — then shows your final amount spent when you're done.
Built as part of my Python internship at DecodeLabs (Batch 2026).
Make sure Python is installed, then run:
python Project2.py
- Run the script
- Enter an expense amount and hit Enter
- Keep adding expenses
- Type quit when you're done
- Your total spending will be displayed
=== Expense Tracker === Enter expense (or 'quit' to finish): 2400 Added! Running total: $2400.00 Enter expense (or 'quit' to finish): 1200 Added! Running total: $3600.00 Enter expense (or 'quit' to finish): quit
Total Spent: $3600.00
- Accumulator pattern (total += expense)
- While loops for continuous input
- Type conversion with float()
- Error handling with try/except
- Sentinel values to exit a loop cleanly
DecodeLabs Industrial Training Batch 2026
- Python Project 2