A simple yet powerful command-line calculator built with Python. It supports basic arithmetic operations as well as advanced math functions like square root, power, and logarithms.
- ✅ Basic operations: Addition, Subtraction, Multiplication, Division
- 🔢 Advanced math: Power, Square Root, Logarithm (base 10 and natural)
- 🛡️ Input validation and error handling (e.g., division by zero)
- 🔁 Continuous mode – perform multiple calculations without restarting
- 📂 Ready for extension (easy to add new functions or save history)
- Make sure you have Python 3.7 or higher installed.
- Clone this repository:
git clone https://github.com/hasan1369sh/Python-Calculator.git
- Navigate to the project folder: cd Python-Calculator
- Run the calculator: python calculator.py
Example Usage : 🧮 Welcome to the Python Calculator!
--- Calculator Menu ---
- Add (+)
- Subtract (-)
- Multiply (*)
- Divide (/)
- Power (x^y)
- Square Root (√x)
- Logarithm (log10)
- Natural Log (ln)
- Exit
Choose an operation (1-9): 5 Enter the base number: 4 Enter the exponent: 3 ✅ Result: 4 ^ 3 = 64.0
👤 Author 👤 Hassan SHerafat 📧 hasansherafat5172@gmail.com 🔗 GitHub Profile : https://github.com/hasan1369sh/