A command-line calculator built in Python. Supports basic arithmetic operations.
Make sure you have Python 3 installed, then:
python calculator.py- Addition, subtraction, multiplication, division
- Division by zero handling
- Clears the screen between operations
- Non-integer inputs (e.g.
2.5,abc) crash the program —try/excepthandling to be added - Division results are truncated to integers (e.g.
7 / 2returns3instead of3.5) - Invalid operation selections (e.g.
6,7) cause a crash
- Input validation with proper error handling
- Float support for both inputs and division results
- Additional operations (exponentiation, modulo)
First Python script. Built as part of a self-directed learning roadmap toward fintech development.