How dhyanesh08/python-calculator works
This is a small interactive command-line calculator. A user repeatedly selects an operation, enters numeric input, and sees a result; binary and unary operations are supported, including trigonometry and logarithms. All behavior lives in calculator.py: it validates input, dispatches through operation dictionaries, and prints results. The README lists the same capabilities. No separate storage or service layer exists.
Main entry points: calculator.py Interactive loop
Components 8
Calculator CLI
- Interactive loop
calculator.py - Number input
calculator.py - Operation dispatch
calculator.py - Printed result
calculator.py
Math Operations
- Binary operations
calculator.py - Unary operations
calculator.py
Other components
- User
- Python math
Connections 10
- User → Interactive loop: enters choices
- Interactive loop → Number input: requests numbers
- Number input → Interactive loop: returns values
- Interactive loop → Operation dispatch: selects operation
- Operation dispatch → Binary operations: calls binary
- Operation dispatch → Unary operations: calls unary
- Unary operations → Python math: uses trig/log
- Binary operations → Printed result: returns value
- Unary operations → Printed result: returns value
- Printed result → User: prints result