Skip to content

calwjones/Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calculator

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.


How to Run

python Calculator/main.py

Requires 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)

How It Works

MVCmodel.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.

About

Desktop calculator with simple and scientific modes. Python/Tkinter.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages