Skip to content

imfarhan0105-bits/Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Simple Tkinter Calculator

This is my attempt to create a simple calculator using Python. I have tried to keep it easy to understand and have added comments throughout the code for clarity.

Libraries Used

  • tkinter – for the graphical user interface (buttons, display, frames).
  • ast – used in the calculation part to convert the input expression into an Abstract Syntax Tree and then compile it for evaluation.

Features

  • Clear and simple code structure for easy customization.
  • Button styles are defined once and reused throughout the interface.
  • Designed with future expansion in mind – you can easily add more buttons or memory functions.
  • Buttons are organized into two groups:
    • Upper rows (functions) with one color.
    • Lower rows (digits and operators) with another color for better readability.

Usage

  • Run calculator.py to start the calculator.
  • Enter numbers and operations using the buttons and press = to get the result.
  • Supports undo () and clear (C) operations.

Future Improvements

  • Adding memory features (M+, MR, etc.).
  • Adding more advanced mathematical functions.
  • Adding a windows pin button to pin the calculator on the top screen which will be quite helpful in case of working with excel.

Happy Calculating!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages