Desktop calculator app built with Python and Tkinter. Has a simple mode for basic arithmetic and a scientific mode with trig, logs, and square roots.
python Calculator/main.pyRequires Python 3 with Tkinter (included in most installations).
| Key | Action |
|---|---|
0-9, ., +-*/%^ |
Input |
Enter / = |
Evaluate |
Escape |
Clear |
Up / Down |
Cycle history |
Cmd+C |
Copy result |
Cmd+V |
Paste into expression |
| Click expression | Edit mode (free cursor) |
MVC — model.py handles all the maths, view.py draws the UI, controller.py wires them together and handles input.
Parsing — Expressions are parsed with the Shunting Yard algorithm into reverse Polish notation, then evaluated with an RPN stack. No eval() anywhere.
Modes — Simple mode shows a standard 4x4 grid. Scientific mode expands the window with extra columns for trig functions, logarithms, square root, constants, and variable storage.