A simple Python CLI calculator that takes two numbers and an operator as arguments.
python3 calc.py <number> <operator> <number>+- Addition-- Subtraction*- Multiplication/- Division
python3 calc.py 10 + 5 # Output: 15
python3 calc.py 10 - 3 # Output: 7
python3 calc.py 6 * 7 # Output: 42
python3 calc.py 15 / 4 # Output: 3.75The calculator gracefully handles:
- Invalid numbers
- Unknown operators
- Division by zero
- Missing arguments
MIT