README.md
README.md
🧮 Python Calculator
A simple command-line calculator application built with Python.
Features
- Basic arithmetic: addition, subtraction, multiplication, division
- Expression evaluation: supports complex mathematical expressions
- Power operations: use
^or**for exponents - Parentheses: full support for nested expressions
Usage
Run the calculator with the --eq flag:
python main.py --eq "5 + 3"
python main.py --eq "10 * (2 + 3)"
python main.py --eq "2 ^ 8"
Project Structure
main.py- CLI application entry pointlib/- Library modulescalculator.py- Core calculator logic
tests/- Test files
Examples
| Expression | Result |
|------------|--------|
| 5 + 3 | 8 |
| 10 - 4 | 6 |
| 6 * 7 | 42 |
| 15 / 3 | 5.0 |
| 2 ** 10| 1024 |
💡 Tip: Use the Args input field in the editor toolbar to pass command line arguments!
Output
Output will appear here
Click Run to execute code
