Тёмный

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

Programiz
Подписаться 172 тыс.
Просмотров 154 тыс.
50% 1

Опубликовано:

 

4 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 152   
@SarasaYugantha
@SarasaYugantha 3 года назад
One of most underrated guys on the youtube you deserve 10mviews for your amazing tutorials....
@graphixig
@graphixig 3 года назад
10 views?🙄
@SarasaYugantha
@SarasaYugantha 3 года назад
@@graphixig 10m what i should say my bad
@SarasaYugantha
@SarasaYugantha 3 года назад
Please make more tutorials with designing programs not only python c++ c# php swift things like plz
@SarasaYugantha
@SarasaYugantha 3 года назад
i learned python for 3months but your this video literally get to me know python
@Jdeadevil
@Jdeadevil 2 года назад
I give up, it's really hard to follow along with this because of how convoluted this is compared to every other Tkinter tutorial I've watched. That would be fine, but I'm about half way through, and I've got this problem I cannot figure out, but I have no chance of figuring this out because all the comments are just "I'm going to do this" which has given me no point of reference. This is like more of a video you'd put in your portfolio to prove you're already a genius.
@genuine0
@genuine0 7 месяцев назад
Trust me, I have been coding for years, and the only way to learn is to get your hands dirty, and sweat and blood, trials and errors, these tutorials are not going to teach you anything, find some website enrol, take few courses and seek projects, and build projects, preferably with a tutor “hence” tutorial. These guys are here to show off, "look what we can do", and believe me, you need to understand the very basics first, and the concepts, all of the functions and methods are secondary, you will learn them in time and nobody knows all the functions, but you need to know what you’re about to create then look for the right tools to build it, but you need to know how to use those tools. That’s all there is to it. Start learning to code, 20 minutes every day and in three months you will learn to do many things all by yourself. My advice is start learning to use python, C++, JavaScript, etc… and using tkinter, kivy will only teach you how to code with tkinter and kivy, and then if you’re forced to use real coding, you will find yourself stranded in the middle of nowhere.
@genuine0
@genuine0 7 месяцев назад
There is no genius, you learn to code like you learn to drive a car, to ride a bike, to play the piano, guitar, or to learn to speak another language the key is practice that’s all, no genius there.
@David-fq5un
@David-fq5un 6 месяцев назад
Yes, it would be nice if he explained more why he is doing things, but I've followed along and it is working. Use your brain and try to think what is happening. Use pencil and paper to go through some of the steps if it helps.
@devadathr6840
@devadathr6840 2 года назад
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. 😍😍
@Andryux94
@Andryux94 11 месяцев назад
Thanks for your Video and all your explanation, have a good week-end Man!
@brokenbackisbad9049
@brokenbackisbad9049 3 года назад
His razer laptop background matches with the programming language he uses
@noone8740
@noone8740 3 года назад
Much better than copying to intense music. Tysm.
@adrienmalosse8782
@adrienmalosse8782 2 года назад
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 !!
@SL_Beast
@SL_Beast 9 месяцев назад
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
@vishavjeetsharma5824
@vishavjeetsharma5824 3 года назад
came here from your website......awesome youtube channel like your website.......keep uploading good stuff like this...thanks
@bhuvaneshwarig6517
@bhuvaneshwarig6517 11 месяцев назад
I FOUND IT!!!! THANK U SO MUH JIIII.......
@sai24243
@sai24243 2 года назад
iam getting error like( AttributeError: 'Calculator' object has no attribute 'window)
@fatimazahra8411
@fatimazahra8411 2 года назад
me too have you fix it ?
@glorysonhorace3265
@glorysonhorace3265 3 года назад
Am mad at myself for not having met this channel earlier. 😂 Your content is very educative and I really appreciate your work.
@naturebeauty2421
@naturebeauty2421 2 года назад
but I wanna ask one thing that i am getting error ". calculator has no attribute create_display_frame() so can you tell me it's fix?
@David-fq5un
@David-fq5un 6 месяцев назад
Good video overall. Need more explanation why you coded it a certain way or what the code does, not just give the code.
@defnotshurainu
@defnotshurainu 2 года назад
Thank you so much for this amazing video! I really learnt so much things from you and your my favorite youtuber
@autarroy
@autarroy 3 года назад
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
@BruceVayne
@BruceVayne 11 месяцев назад
Whats your theme? looks amazing
@Lily-fc5li
@Lily-fc5li 2 года назад
thank you , I had so much fun while coding!
@Yti_omar
@Yti_omar 3 месяца назад
21:20
@furqanali8408
@furqanali8408 2 года назад
You were great at explaining
@marcingarbarczyk7196
@marcingarbarczyk7196 3 года назад
Good work, i love this channel.
@ovi_4
@ovi_4 2 года назад
Hi, just managed to follow the complete code with NO errors but even then it would just simply not run at all since I just could not install the venc (the virtual environment in python) for some reason. It kept telling me that this computer is missing some permissions for running scripts. So as a result while working on the code I could only rely on no error reporting method (available from within pycharm code window. However, I decided to finalize the code and managed to install pyinstaller in hope that it will run after packing the file into an executable (ready for my win 10 64Bit pro) but to my surprise, the app that I created still doesn't open, and doesn't complain at all. I do not see any error window showing up. I even tried to run the executable file as admin and in compatibility mode but still doesn't work. It is really frustrating after 2 days of working on this code still no joy. Now, what ??? Am I stuck here forever??? Please help anyone outthere. Tnx alot.
@jackcorsobarbiere-it7645
@jackcorsobarbiere-it7645 2 года назад
me too same problem, did you solved? if yes, how?? @Programiz heeelp
@tobyinstrumentals5461
@tobyinstrumentals5461 Год назад
You probably figured it out but I also encountered the same error. Fortunately enough I'm in the era of chatgpt so i was able to find a solution using this command "Set-ExecutionPolicy -Scope CurrentUser RemoteSigned" Paste this command on your terminal when you encounter that problem and it should be fixed. You can then proceed to activate your venv using the activation command. Hopefully this helps
@howtoanything5542
@howtoanything5542 2 года назад
Can anyone tell what is the font he is writing the code in
@gonzaloplazag
@gonzaloplazag 2 года назад
Amazing video! This video deserves 10m like!
@jacobzheng8701
@jacobzheng8701 2 года назад
Thank you for making this video!!😀
@tinyfungii
@tinyfungii 3 года назад
Very cool Soyuz
@Alex-fk2ie
@Alex-fk2ie 3 года назад
Thank you for your tutorial ! It helps me a lot
@slickwillie3376
@slickwillie3376 2 года назад
This is a good learning tool. Thx.
@oyevicuu
@oyevicuu 3 года назад
Waiting for it
@jahedulbhuiyan4891
@jahedulbhuiyan4891 2 года назад
when I write the sqrt(10) ,then why it is not showing the floating number??? only sqtr(9) = 3.0 ,sqrt(4) = 2.0 .......are showing the accurate result
@lurxy-ur7126
@lurxy-ur7126 2 года назад
There should be a backspace button on the calculator, but how will I make that?
@SRMasood
@SRMasood Год назад
How will I add the "navigation" button? Where it shows more options to different calculator?
@yadhufr
@yadhufr 2 года назад
calc.run is not showing for me
@patriciamaliwanag5381
@patriciamaliwanag5381 3 года назад
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?
@johnmandydalag5580
@johnmandydalag5580 Год назад
I can't open the folder using pycharm, no 'open with pycharm" button
@lostsoul2184
@lostsoul2184 Год назад
question . when I add too much numbers the whole window stretches. how can I prevent that ?
@hajarajdid3051
@hajarajdid3051 Год назад
What if you want to add trigonometrical functions, how do you do that???
@ayuketaruben
@ayuketaruben Год назад
the cod is run successfully but nothing is displaying on my screen for view. pleas help me out thanks.
@widepootis
@widepootis 3 года назад
That was a super informative and really nice tutorial to follow along thanks!
@alnajm9952
@alnajm9952 2 года назад
Thank you, sir! 😍😍
@aaryankakad6627
@aaryankakad6627 3 года назад
Eagerly Waiting...🔥
@pushpitsharma1867
@pushpitsharma1867 2 года назад
thank you ap ne mera school me watt badaha deya
@umeshchandel8917
@umeshchandel8917 3 года назад
After using bind my calculator is not working can please solve the error
@prerit791
@prerit791 2 года назад
Dhanyabad dai❤
@SunnyGarasia
@SunnyGarasia 2 года назад
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.
@angelneykov7393
@angelneykov7393 3 года назад
Thank you, sir!
@pawanpal9373
@pawanpal9373 2 года назад
I am also doing the but it's showing errors because of pack() and grid(), can't use in same class
@amirraja7798
@amirraja7798 6 месяцев назад
nice video man
@rafaelrivera9291
@rafaelrivera9291 Год назад
Is there an exercise to make this calculator?
@kona_kona14
@kona_kona14 Год назад
i try run this code what he try run in 5.40 but when i run it " Error running 'calc': Cannot run program "C:\Users\Käyttäjä\PycharmProjects\animation\venv\Scripts\python.exe" (in directory "C:\Users\Käyttäjä\Desktop\calculator"): CreateProcess error=2, The system cannot find the file specified" help
@AmanRaj-rk9or
@AmanRaj-rk9or 2 месяца назад
plz tell me that how to write multiply sign in geometry?
@williantran4928
@williantran4928 8 месяцев назад
How about making a sin cos tan button sir, pls help me!
@amegbehaeloge1364
@amegbehaeloge1364 Год назад
Helpful but can't see it well.if you can zoom it a bit for the views
@owllinux
@owllinux 2 года назад
Why was a Lambda function used? When it came to the button(command = lambda:function() ). Why not just the function?
@David-fq5un
@David-fq5un 6 месяцев назад
You can't directly assign a call to a function with an argument as an assignment, only a function name. lamba lets you get around that.
@jagrititripathi8308
@jagrititripathi8308 8 месяцев назад
Throws error in if __name__ function and gui doesn't run
@sahasict9887
@sahasict9887 2 года назад
thanks thanks thanks good luck
@warrior1276
@warrior1276 2 года назад
i cant seem to be able to change the background colour can u please help me
@krzysztofchruscielski626
@krzysztofchruscielski626 8 месяцев назад
_tkinter.TclError: cannot use geometry manager grid inside . which already has slaves managed by pack?
@PrivateKero
@PrivateKero 2 года назад
This video leaves me with mixed feelings. It shows important solutions that everyone will come across when working with tkinter. But one thing bothers me a lot. In this video there is little explanation of why such decisions were made and what the long-term benefits are. For example, I wondered why we don't fill the dictionary with all the buttons. Later in the video this becomes clear, but the viewer must ultimately make the findings himself. Likewise, the concept of updating the label didn't really make sense to me until later and you just had to accept it during the implementation. In the end, the video probably shows interesting concepts, but doesn't really go into why things are solved this way, but simply does it.
@Jdeadevil
@Jdeadevil 2 года назад
It's impossible to debug because none of it explained well at all. I've tried comparing code exactly and I can't explain why I'm having this problem (the numbers appearing at the top but not the bottom display label). But his "I'm just going to---" comments make no sense.
@PrivateKero
@PrivateKero 2 года назад
@@Jdeadevil can you show your code? Maybe I can help.
@lukeav6097
@lukeav6097 2 года назад
why is the window not resizable?
@hannahpj6002
@hannahpj6002 2 года назад
thank you!
@TheBajamans
@TheBajamans 3 года назад
Thank you so much for this amazing tutorial! I've learned a lot from it. There is only one thing i don't understand and it is why when trying to solve the problem where pressing any key would resulti in only "." being printed on the screen, "lambda x=digit: self.add_to_expression(x)" works, but "lambda: self.add_to_expression(digit)" doesen't. Keep up the amazing work!
@antoc779
@antoc779 2 года назад
I believe that in the first case at the moment of calling the self.add_to_expression(digit) through the lambda function the value of the argument (digit) will corrispond to the last value assigned in the loop (In our case "."). In the second case, with lambda x=digit: self.add_to_expression(x) we assign a default argument to x that corrisponds to the value of digit at the step of the loop where the button is created (The button showing "1" will have a default value of "1", "2" of "2" and so on)
@DevOpsOnSteroids
@DevOpsOnSteroids 3 года назад
When can i get notes on HTML,CSS,React,DBMS on your website.?
@kbimero1
@kbimero1 3 года назад
Hello greetings from Venezuela, I am learning python and I decided to do this exercise with you. I'm having trouble using the calculator with the keyboard. I use linux mint, will there be a configuration problem with linux? Thank you for your time. There I send you an extract of the code. Thanks in advance. # using calculator from the keyboard def bind_keys(self): self.window.bind("", lambda event: self.evaluate()) for key in self.digits: self.window.bind(str(key), lambda event, digit = key: self.add_to_expression(digit)) for key in self.operations: self.window.bind(key, lambda event, operator = key: self.append_operator(operator))
@pietrodante6016
@pietrodante6016 2 года назад
I had also trouble with the keyboard. Please add to the function bind_keys: self.window.bind("", lambda event: self.clear()) # add clear key self.window.bind("", lambda event: self.square()) # add square key with pressed self.window.bind("", lambda event: self sqrt()) # add square-root key with pressed. I had no trouble with and keys on my keyboard. If you have, try any other key of yourchoice to perform add_to_expression()
@tomoyaokazaki9915
@tomoyaokazaki9915 3 года назад
Also one thing convert that python file into .exe file and share it with us .
@leomonk974
@leomonk974 2 года назад
That’s not how that works
@adityaraj04
@adityaraj04 2 года назад
@@leomonk974 This kid thinks everything is so simple😂 i guess he doesn't even know how many characters do we write to get a single world hello🙃
@redstonegod296
@redstonegod296 2 года назад
@@adityaraj04 just 4 lines of code to make a simple label texted hello world
@adityaraj04
@adityaraj04 2 года назад
@@alaa6809 c language 🙂
@dazewaker262
@dazewaker262 Год назад
@@leomonk974 lol that is how it works.
@umaraliali8241
@umaraliali8241 3 года назад
Please send the coding text.. Im getting error..while doing eval function
@nunomeira3850
@nunomeira3850 2 года назад
Nice tutorial! help me a lot to learn more. Im starting my journey in python and this challenge is very good. But can I ask you a basic thing? Instead of having all the functions in the main .py can we divide them in different scripts and them import to the main or it has to be all in the same? Thanks
@Mr-Yuki
@Mr-Yuki 2 года назад
You can. And then you can import them using the import at the top of your script. Look up how import works and you'll learn how easy it is
@enasali1777
@enasali1777 2 года назад
You can not use pick and grid together
@trevesgordio8917
@trevesgordio8917 3 года назад
How to enable backspace in the calculator
@williantran4928
@williantran4928 7 месяцев назад
How can I make a delete button?
@atharvpatole5327
@atharvpatole5327 2 года назад
i'm getting attribure error as 'str' object has no attribute 'tk' @programiz
@shreyapardeshi4848
@shreyapardeshi4848 2 года назад
Can I perform it on Mac 🤔??
@musaisaac4015
@musaisaac4015 2 года назад
very interesting tutorial.straight forward steps but i had an issue when adding Functionality to the Buttons,it doesnt display the value when clicked even i corrected this line of code "command=lambda x=digit: self.add_to_expression(x)"
@HudsonLetsPlay
@HudsonLetsPlay 2 года назад
Lambda is capital, kinda late but hope it helps lol.
@ashwinm1825
@ashwinm1825 2 года назад
tkinter output is not opening,I don't know why? Any one know solution
@ahmedrahat2921
@ahmedrahat2921 2 года назад
How to calculate percentage and create button
@adamviktorklimes405
@adamviktorklimes405 2 года назад
You speak very quitely and the effect sound is too loud. Thanks for the video and online python interpreter!
@hshs510
@hshs510 2 года назад
What theme are you using?
@ezikell
@ezikell 2 года назад
Thank you for this amazing video man! I do wanna know if you know how to make an erase button, where I can just remove one number at a time?
@DynamoTuber
@DynamoTuber 2 года назад
def click(value): ex = entryField.get() answer = '' try: if value == 'C': #Here c = Clear button (works like a backspace key) ex = ex[0:len(ex) - 1] entryField.delete(0, END) entryField.insert(0, ex) return This will be your command.... now just insert a button using tkinter button command and you are good to go.
@Conversion108
@Conversion108 2 года назад
Can you guys make a browser like chrome
@NamelessFG
@NamelessFG 3 года назад
Why is it that after I added the Square and sqrt function lines my equals and clear buttons dissapared in the gui? Great video anways.
@devscloud7600
@devscloud7600 3 года назад
it coulod happen that you put the sq and sqrt button at the same location of clear and equal
@ДаниилКривко-в9э
@ДаниилКривко-в9э 3 года назад
Thanks!
@naturebeauty2421
@naturebeauty2421 2 года назад
nice video
@MukaghaliBerdibayev
@MukaghaliBerdibayev 10 месяцев назад
how to open folder by pycharm
@aandresriera7927
@aandresriera7927 2 года назад
great great video
@kimcaeiro8461
@kimcaeiro8461 2 года назад
hi could you please share the entire code in a file. thanks
@kushal-shaw-pvt
@kushal-shaw-pvt Год назад
Where is the source code for this ??
@miyukisakiko
@miyukisakiko Год назад
bro video haru nepali ma ni xa?
@tomoyaokazaki9915
@tomoyaokazaki9915 3 года назад
Me to waiting
@VC-pd6vy
@VC-pd6vy Год назад
AttributeError: 'Calculator' object has no attribute 'window' can anyone help me?
@David-fq5un
@David-fq5un 6 месяцев назад
try starting again from scratch. or try copying just the basic start code from his code at GitHub. I had that problem at first, and couldn't figure out why it didn't work for me.
@renadnasr7091
@renadnasr7091 3 года назад
The explanation is not enough I had to search some stuff on google and you're actually just saying what you write but nothing more
@imcgrzainwh4379
@imcgrzainwh4379 3 года назад
Isn't that how you're supposed to learn? Don't be hesitant to search things in Google...no one is going to make videos specifically catering to your needs. Happy learning!
@renadnasr7091
@renadnasr7091 3 года назад
@@imcgrzainwh4379 thanks for the advice!
@Tom-py9vc
@Tom-py9vc 3 года назад
@@imcgrzainwh4379 what's the point of making this video if he doesn't actually SAY why he's doing the things he does and why the code is structured the way it is? This video is only useful for the code in the description that you can download and use for reference in personal projects
@hackcoder6521
@hackcoder6521 3 года назад
How to add icon for app
@riyashrestha3483
@riyashrestha3483 3 года назад
NICE
@tomasbernardo5972
@tomasbernardo5972 3 года назад
I have a problem for some time, when I try to open a .exe file that has been created from a python file it opens a console and then it instantly coses it. I'm not sure what should I do to fix this. Any help is appreciated
@programizstudios
@programizstudios 3 года назад
Hi Tomas, please make sure that .exe file is created successfully with the required command line parameters.
@karagani_roy
@karagani_roy 2 года назад
While making .exe file you have to mention --noconsole and make sure to add mainlooop at end of program.
@vineetchaudhary6661
@vineetchaudhary6661 2 года назад
When you 04 ÷ 3 it give you error pls help
@pietrodante6016
@pietrodante6016 2 года назад
because of the zero : if you do 4 / 3 = correct result displayed!
@tanverahmed5666
@tanverahmed5666 Год назад
How can I run on emulator
@georg101
@georg101 3 года назад
Nice. Could you make a project with pyqt5?
@roshangainju4104
@roshangainju4104 Год назад
nepal bata ho??
@lastonline2614
@lastonline2614 3 года назад
Waiting....
@kishansindhi6963
@kishansindhi6963 3 года назад
please upload dart programming video
@kishansindhi6963
@kishansindhi6963 3 года назад
or upload dart tutorial on website
@anchallama8121
@anchallama8121 3 года назад
daju varkhari club house bata aako
@riteshojha4607
@riteshojha4607 Год назад
Anyone can provide me source code?
Далее
Modern Graphical User Interfaces in Python
11:12
Просмотров 1,5 млн
Python calculator app 🖩
15:08
Просмотров 76 тыс.
PERFECT PITCH FILTER.. (CR7 EDITION) 🙈😅
00:21
Просмотров 3,9 млн
Learn Python With This ONE Project!
55:04
Просмотров 1,8 млн
Smart Scientific Calculator Using Python
49:13
Просмотров 30 тыс.
3 PYTHON AUTOMATION PROJECTS FOR BEGINNERS
17:00
Просмотров 1,6 млн
Let's code a SNAKE GAME in python! 🐍
33:06
Просмотров 630 тыс.
Python calculator program 🧮
3:55
Просмотров 164 тыс.
Simple GUI Calculator in Python
22:51
Просмотров 274 тыс.