A simple yet powerful command-line calculator built in Python.
It performs both basic and advanced mathematical operations with clean input handling and looping features.
- Basic arithmetic:
+,-,*,/,** - Advanced functions:
sqrt→ Square rootroot→ Any root (e.g., cube root)abs→ Absolute value%→ Modulusall→ Perform all operations at once
- Validates operator input until correct
- Handles divide-by-zero errors gracefully
- Loops until the user chooses to exit
- Make sure you have Python 3 installed.
- Download this repository or clone it using:
git clone https://github.com/YOUR-USERNAME/Python-Calculator.git
- Run the file:
python main.py
Python Calculator
====================
Enter the first number: 5
Enter the second number: 2
Enter an operation (+, -, *, /, **, all, sqrt, root, abs, %): all
Performing all operations:
Addition: 7.0
Subtraction: 3.0
Multiplication: 10.0
Division: 2.5
Exponentiation: 25.0
Aarohi Dongarwar
B.Tech CSE (Data Science) Student
📍 Nagpur, India
⭐ If you like this project, give it a star!