Calculator with GUI Using Python Tkinter (Less Than 200 lines of Code)

preview_player
Показать описание
Python project-based learning videos for absolute beginners!

We frequently use built-in programs like calculators without thinking about how they were designed or what's underneath the hood. It's essential for you to think about these things if you want to become a better software developer. The end goal of learning to program is to solve real-world problems and the best way to do so is by working on projects and putting your knowledge to use.

So, in this video, Soyuj demonstrates one such project that can help beginners get started with building projects in Python. By the end of this video, you will learn how to build your own calculator app in less than 200 lines of Python code. Not only that, you will learn to add advanced features like making the calculator usable from the keyboard and creating its executable file.

For this tutorial, we will use the built-in Tkinter module and take inspiration from the standard Windows Calculator App. Remember that the main takeaway from this video should not be just to build a calculator in Python but also to learn things that are often overlooked like how to structure your project and write clean readable Python code.

~
To follow along with this tutorial, you need to have a basic understanding of Python. For that, you can check our resources:

Learn Python App (iOS and Android):

~
Links Mentioned in the Video:

~
Timestamps:
0:00 Intro
0:16 Final Calculator Preview
1:45 Building the Calculator
6:04 Creating the Frames
8:40 Adding the Display Labels
13:05 Adding the Digit Buttons
17:25 Adding the Operator Buttons
24:35 Adding Functionality to the Buttons
32:41 Enhancements to the Calculator
33:36 Adding Square and Square Root Buttons
36:50 Changing the Operator Symbols
37:55 Truncating the Results
38:21 Handling Exceptions like ZeroDivisionError
39:13 Using Calculator from the Keyboard
41:45 Creating an .exe file of our Calculator

Find Programiz elsewhere:

#python #learnprogramming #programiz #pythonproject #projectbasedlearning
Рекомендации по теме
Комментарии
Автор

Thank you so much for this amazing video! I really learnt so much things from you and your my favorite youtuber

defnotsg
Автор

Thanks for your Video and all your explanation, have a good week-end Man!

Andryux
Автор

Thank you for your tutorial ! It helps me a lot

Alex-fkie
Автор

Thanks for the tutorial, it helps me a lot, I learnt a lot with this video. You're doing a great job ! I was writing some python code before but never with gui, now I want to learn more from tkinter !!

adrienmalosse
Автор

One of most underrated guys on the youtube you deserve 10mviews for your amazing tutorials....

SarasaYugantha
Автор

came here from your youtube channel like your uploading good stuff like this...thanks

vishavjeetsharma
Автор

Very useful video. Absolutely advanced and short but still highly effective. Expect more contents from you. I'm new to this Object Oriented Programming. So would like to have some lessons from you. Also I request you to make video on a python GUI Dictionary and a GUI Address/Contact Book. It will be so helpful if it's so. 😍😍

devadathr
Автор

Much better than copying to intense music. Tysm.

noone
Автор

That was a super informative and really nice tutorial to follow along thanks!

widepootis
Автор

Thank you so much. can you recommend us a package to test the calculator GUI or any vid that can help us write Calculator GUI?

patriciamaliwanag
Автор

thank you, I had so much fun while coding!

Lily-fcli
Автор

Am mad at myself for not having met this channel earlier. 😂 Your content is very educative and I really appreciate your work.

glorysonhorace
Автор

sir can you also make a video
while i typing a number in the entry widget the number must separate in thousand for example
if i'm typing 1200 it must separate 1, 200

autarroy
Автор

I literally found this on git while browsing lol it's a cool programme.
I have my own calculator code on git but it doesn't have any GUI just basic calculations on a good old terminal

SL_Beast
Автор

On the output screen which is calculator GUI I can't see the operator symbols other than addition. I can see all the numbers, C, = but can't see other operators which are -, %, *. So can you please help me out with it. I used same syntax that you used.

SunnyGarasia
Автор

When can i get notes on HTML, CSS, React, DBMS on your website.?

DevOpsOnSteroids
Автор

How will I add the "navigation" button? Where it shows more options to different calculator?

SRMasood
Автор

His razer laptop background matches with the programming language he uses

brokenbackisbad
Автор

There should be a backspace button on the calculator, but how will I make that?

lurxy-ur
Автор

I am also doing the but it's showing errors because of pack() and grid(), can't use in same class

pawanpal