This project is a basic Expense Tracker written in Python.
It demonstrates the concepts of Try...Except, String Formatting, User Input, and Virtual Environment learned from W3Schools.
- User Input: Ask the user for an expense name and amount.
- Try...Except: Handle invalid inputs (like entering letters instead of numbers).
- String Formatting: Display expenses in a neat formatted way (e.g.,
$50.00 on Food). - Virtual Environment: Can be run inside a Python virtual environment for isolation.
Enter expense name: Food Enter expense amount: 50
You spent $50.00 on Food
Enter expense name: Travel Enter expense amount: abc
Invalid amount! Please enter a number.
This project is based on:
- Python Try...Except
- Python String Formatting
- Python User Input
- Python VirtualEnv
This project is for learning purposes only.
Run inside a virtual environment to keep dependencies isolated:
python -m venv venv
.\venv\Scripts\activate # On Windows
source venv/bin/activate # On macOS/Linux