A simple command-line calculator application written in Python that supports basic arithmetic operations.
- Addition (+)
- Subtraction (-)
- Multiplication (*)
- Division (/)
- Power (^)
- Modulo (%)
- Error handling for division by zero
- User-friendly menu interface
- Input validation
- Python 3.x
- Clone this repository:
git clone https://github.com/samsond/python-calculator.git
cd python-calculator- Run the calculator:
python calculator.py- Run the application
- Select an operation from the menu (1-6)
- Enter two numbers when prompted
- View the result
- Press Enter to continue or select 7 to exit
========================================
PYTHON CALCULATOR
========================================
1. Addition (+)
2. Subtraction (-)
3. Multiplication (*)
4. Division (/)
5. Power (^)
6. Modulo (%)
7. Exit
========================================
Select operation (1-7): 1
Addition selected
Enter first number: 10
Enter second number: 5
Result: 10.0 + 5.0 = 15.0
Press Enter to continue...
This project is open source and available under the MIT License.