A simple Python command-line calculator with history support.
This Python-based command-line calculator is suitable for beginners.
I created this project to practice Python fundamentals such as file handling, functions, user input handling, and basic error handling.
The calculator also preserves past results by storing calculation history in a text file.
- Performs basic arithmetic operations:
- Addition (+)
- Subtraction (-)
- Multiplication (*)
- Division (/)
- Supports brackets
() - Supports power operation using
^ - Saves calculation history to a file
- Commands available to view or clear history
- Handles invalid input and division by zero
- Python 3
- File Handling
- Basic Exception Handling
- Make sure Python is installed on your system
- Download or clone this repository
- Run the program using:
python calculator.py