A simple command-line calculator built using Python.
This project demonstrates basic programming concepts like input handling, conditional logic, and error handling.
- ➕ Addition
- ➖ Subtraction
- ✖️ Multiplication
- ➗ Division (with zero-check)
- Exponential
- 🧮 Modulus
- 🎨 Colored output using colorama
⚠️ Basic error handling
Simple Calculator
Enter first number: 10
Enter operator (+, -, *, /, %): +
Enter second number: 5
Result: 15
-
Python 3.x
-
colorama library
-
Install dependency:
-
pip install colorama
- Using if-elif-else for decision making
- Handling user input with input()
- Type conversion using float()
- Error handling with try-except
- Improving CLI UX using colors
- Runs only once (no loop yet)
- Does not store previous results
- Limited operator support
Beginner / Novice
This project is part of my learning journey in Python. More advanced projects coming soon 🚀
This is a personal learning project, but suggestions are always welcome!