Skip to content

sushantPatrikar/Python-tkinter-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Python-tkinter-calculator

License: MIT stars Python 3.6

This is my first python project. From the start I had an interest in GUIs, so as soon as I learnt the basics of tkinter I started working on this project.

Making the layout of the calculator

In this calculator, a frame is used for making the screen, and two labels, one for putting digit buttons and the other for function keys are used. I used sub-labels inside these labels to put buttons on it

Making the screen

Entry box is used for making the screen of the calculator

Giving life to the buttons

Till this stage my claculator was completed, virtually, it was not functionable. I tried binding buttons to the functions but the results were printed on the console and not on the calculator's screen, so I tried using lambda in the buttons and it worked!

Giving Midas touch to the calculator

I put this code in the init function of the class calculator and gave it nice color combinatons to make it look more beautiful,and here it is!

screenshot 2

P.S:- When you see my code, you'll find that I've commented out some part of my code, that's because I was trying to add one more button in the calculator 'delete' which would delete just the first digit from the right but when I'm trying it, it is throwing out some errors. So I will update it as soon as I find the solution.

Feedback is welcomed!

Happy Coding :)

About

A simple GUI based calculator which can perform basic arithmetic operations

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages