Giter Club home page Giter Club logo

python-tkinter-calculator's Introduction

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

python-tkinter-calculator's People

Contributors

sushantpatrikar avatar surajrdubey avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.