A smart and robust Command Line Interface (CLI) calculator built with Python.
- Continuous Operation: Runs inside a
while Trueloop until you typeexit. - Supported Operations: Addition (
+), subtraction (-), multiplication (*), division (/), modulo (%), and exponentiation (**). - Crash Prevention (Input Guard): Uses
try-exceptblocks to smoothly handle invalid inputs like letters. - Zero Division Protection: Prevents the application from crashing when attempting to divide by zero.
- Overflow Prevention: Limits the power operation (
**) to exponents under 500 to stay within Python's integer string conversion limits.
Make sure you have Python installed, then run the script in your terminal:
python calculator.py