Literally explained better than half of the programmers in KZbin. Makes sense, explains, doesn't do unnecessary stuff.
@arnavmeena5253 жыл бұрын
NeuralNine: *Making Calculator and is doing calculations on it* Also NeuralNine: Am gonna do the calculations myself. Who needs a calculator?
@BrendanBurkartSF Жыл бұрын
this was super helpful and really well done! I actually really liked that you had the lambda still in there for the btn_equals...it let us see your debugging process. Thank you!
@marcosvalencia18833 ай бұрын
Yes
@lerserk Жыл бұрын
19:46 Its the lambda bro!! Thank you for this!
@arslanuzakov9882 жыл бұрын
i really like that thats the first youtube project thats works without error, thank you sir
@Lejo1_LV6 ай бұрын
now i can not agree it dosent wor to me
@soufatldude7009 ай бұрын
do you need pycharm for this, or can you use the normal python application?
@reaction_1247 ай бұрын
hi gojo kun
@soufatldude7007 ай бұрын
@@reaction_124 Nah i'd win.
@Veestar4u10 ай бұрын
Can someone explain why he uses the .delete first before the .insert? What does that do?
@100mikedaniel63 жыл бұрын
Stay on the upload grind!
@NeuralNine3 жыл бұрын
one video every other day! 💪🏻
@AlexMuseMatrix9 ай бұрын
Try 4 videos Every day, It's a great schedule 😎@@NeuralNine
@xxpotatoxx1080p16 күн бұрын
so good will use my own calculator from now on
@wko_3 жыл бұрын
Very simple and very useful! Thanks for one more project like this!
@sithhill Жыл бұрын
How does this do the actual math portion without telling it to do a math calculation? The other calculator I made doesn't have a GUI but all the code is to specify the actual math method being used versus, all we (you) did was create buttons. I followed along and just don't understand how it's automatically doing the math.
@johnbishoppp2 ай бұрын
I think it's the eval() function that's doing the math. At 5:30 he mentions that the eval function will evaluate both mathematical equations as well as code.
@nipoteemus24722 жыл бұрын
Thanks for the tutorial! I have that kind of school project where I have to make a representation of your favorite hobby or that stuff! I planned to make it about coding and I'm trying to do 3 softwares for it and this is fricking good idea!
@Tdahandaluz.3 ай бұрын
I've always wanted to learn to program and this video helped me understand that my biggest enemy is going to be my dyslexia xD
@kalacarte Жыл бұрын
for some reason line 19 isnt working ofr me at 3:43 through 3 :53
@aradthetyper21012 жыл бұрын
brilliant! just one thing. i don't get the part where you put (1.0, "end") after text_result.delete or text_result.insert. what do they mean?
@poorvinalavade86512 жыл бұрын
even i want to know the meaning of those parameters
@timmyt12322 жыл бұрын
In tkinter (for text), delete(first index position, last index position). The 1 is first line. The 0 is before first character. The "end" is to the end of the text. insert(index position, string)
@Himlajchan7 ай бұрын
@@timmyt1232 Would you mind explaining where this 'end' argument is defined? Tried to look into the source via PyCharm, but couldn't find where this is specified, not even in any documentation that I looked trough. How can I know what other strings are valid for the index parameter?
@anirudhpm7155 Жыл бұрын
How can i add √ and on off button could you please help me.
@AbubakarMulla233 жыл бұрын
Love your coding bro... Stay going on..
@hemanmoriya823710 ай бұрын
I made the project the completely but I didn't learned many things from it because it was copy paste time type program for me .
@Soo-qd1co10 ай бұрын
which code editor did you use? I used codesandbox and don't show the pop up page for blank page for... import tkinter as tk calculation = "" def add_to_calculation(symbol): pass def evaluate_calculation(): pass def clear_field(): pass root = tk.Tk() root.geometry("300x275") root.mainloop() and shows up Traceback (most recent call last): File "calculator.py", line 18, in root = tk.Tk() File "/usr/local/lib/python3.8/tkinter/__init__.py", line 2270, in __init__ self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) _tkinter.TclError: no display name and no $DISPLAY environment variable
@hemanmoriya823710 ай бұрын
@@Soo-qd1co I used pycharm for python development
@brendanjordan5485 Жыл бұрын
Thank you for the video! If I want to make it so that I don't have to type a '*' before the parenthesis for the code to recognize that it should multiply, how do I make it so that this code recognizes that 'x(a)", where x and a are any number , are suppose to multiply? Like if I want it to calculate "90/3(1+2)"
@jeez8136 Жыл бұрын
i was wondering that too so i asked chatgpt and this is what it said: To make the code recognize this implicit multiplication, you can add a check in the add_to_calculation function to see if the last symbol in the calculation string is a number, and if so, add the multiplication symbol before adding the parentheses. Here is an updated add_to_calculation function that implements this logic: def add_to_calculation(symbol): global calculation if symbol == "(" and calculation != "" and calculation[-1].isdigit(): calculation += "*" calculation += str(symbol) text_result.delete(1.0, "end") text_result.insert(1.0, calculation) With this code, if the user types a number followed by an opening parenthesis, the function will automatically insert a multiplication symbol before the parenthesis. This means that if the user types "90/3(1+2)", the calculation string will become "90/3*(1+2)" before evaluation.
@TheRealStrider Жыл бұрын
@@jeez8136 So I was wondering this as well and have finally made it work behind the scenes without it showing it add the * before the (. Here is the code: implicit = list(calculation) i = 0 while i
@oadeep Жыл бұрын
thank you so much it works@@TheRealStrider
@efogovirtual9635 Жыл бұрын
I appreciate you, this is absolutely useful, nice tutorial
@Void-Dev2 жыл бұрын
For the buttons why not just use a definition?
@LikinMB17 күн бұрын
Great explanation sir, but it would be better if there was "Clear entry" button which only clears the last number that is entered and I how can I implement that ?
@haokaixuan3 жыл бұрын
love these projects!
@fzel111 ай бұрын
the amount of time he takes to build the calculator is so impressive
@scratchersdotcom93362 жыл бұрын
Very nice tutorial. I very well understood. Really appreciate it 👏
@wise_beanss Жыл бұрын
is it possible to make a delete button? If so how do you do it, cos i have been trying to figure it out for the past week, but still can’t (i’m a beginner btw)
@ethan_haymore39079 ай бұрын
everything worked but the buttons only work individually instead of 1+2 it would just say the number by itself when clicked instead of holding memory. any tips or advice
@anakin.gulliver3 жыл бұрын
can you help me? I get the error: ModuleNotFoundError: No module named 'tkinter' when i tri to do the first test run. I cant seem to get it to work on any ide expect on python terminal alone.
@LyricZ2 жыл бұрын
import tkinter
@tsmghost3 жыл бұрын
Already made that but still learnt something new❤️❤️❤️
@theminecrafttree89132 жыл бұрын
nice flex
@BruceChangwe-yt9ce4 күн бұрын
plaese help I followed everything but when I press a number it's giving me a word calculation. what could be the error
@deeparose29263 жыл бұрын
Loved it!!
@akellner2 Жыл бұрын
Thank you for sharing, I wonder how I can implement an %-Button with the correct function. I tried it but I can`t figure it out.
@kennethlourisombrog2149 Жыл бұрын
Nice. Do you think I can include this in my portfolio to apply for a job? I can say that I followed your tutorial and learned from it.
@AbhayGupta-oz1ix5 ай бұрын
This is what i was looking for. Thanks to tutor.
@affenkratzer10 ай бұрын
i have also a function if you want to remove one character from the calculation if you made an error typing, but you need an extra delete button for it: def remove(): global calculation if calculation: calculation = calculation[:-1] text_result.delete(1.0, "end") text_result.insert(1.0, calculation) pass pass
@Veestar4u10 ай бұрын
Thank you so much.
@Soo-qd1co10 ай бұрын
thank buddy 🙏
@Veestar4u10 ай бұрын
Can you please explain why he .delete came before the .insert?
@affenkratzer10 ай бұрын
@@Veestar4u because of the grid placement you need to change it
@caw9862 жыл бұрын
hi good video all in all but the code keeps on throwing the error message at me when i perform any calculations
@shaunakwasker203 ай бұрын
super helpful and clear, thanks a lot
@riascho Жыл бұрын
Interesting explanation on the eval() functionality. But what alternatives would you suggest for better security?
@GeovaniLopesDias Жыл бұрын
I didn't watched it with audio on, so I don't know what security issues he mentioned, but I was wondering the whole video when would he write the regex code to interpret the string arithmetic expression. It'd require some extra functions to substitute the eval() built-in. For personal challenge, we could try to code these said extra functions.
@skystep2 Жыл бұрын
I am noob, but I would not allowed letters, only go execute eval if there are no letters and other not allowed symbols
@v11r Жыл бұрын
You need to implement a tree
@tomasg101 Жыл бұрын
Thank you dude, I´m learning Python and this was perfect to achieve new knowledge Greetins from Argentina
@bonyimakaveli6332 жыл бұрын
Big thanks man. Really appreciate what you do.
@القراءةمفتاحالعلم Жыл бұрын
Very simple and very useful! Thanks ❤ 🇲🇦
@pan_ching7 ай бұрын
How do you do the copy paste trick??? damn. It seems like it's a shortcut key or somethin' it was so quick ahahahhah
@yadobeatz359 Жыл бұрын
very simle and helpful a lot, thank you a lot
@anonymspro78643 жыл бұрын
Great bro i was finding this only from a long time.Thanks for uploading in this Content.I'm excited for your next video please upload it as soon as possible :) :) :) :) ;) ;)
@MAhmed12_55 ай бұрын
bro thank you very much. you made my day. keep up
@Knowmemelife Жыл бұрын
Brow what will I do if on calculator I click 1 and the result is always calculation
@srshivam962 ай бұрын
Not working now it says TypeError: 'float' object is not subscriptable whenever i press a button
@DC_Luxurious_Cars_ Жыл бұрын
I really enjoyed this. Thank you very much.
@Tom-ks9xl11 ай бұрын
What interface are you using? Looks very good. The standard IDE isn't as nice as this
@N7ShepardSR11 ай бұрын
PyCharm its really good
@Tom-ks9xl11 ай бұрын
Thank you i found it and installed it right onto linux. It's a very nice interface and handy.
@johnbishoppp2 ай бұрын
Why not make a class with attributes for the number, row and column, then make a function for creating the button and run it in a for loop. This is how I did it, to save time and not repeat code. I couldn't figure out how to make the loop also name the buttons incrementally (i.e. btn_1, then btn_2) so I had to type that manually. Also had to manually type out the code for equals and clear as the command was different to the others. Would love your thoughts.
@brany2920 Жыл бұрын
i have tried installing this Tkinter but still wouldnt work on my window 10 or my mac pro. its so confusing i get this error : "ModuleNotFoundError: No module named '_tkinter'" what do i do
@diegos21844 ай бұрын
where did u learn to code?
@svetlanadelrey973 Жыл бұрын
i would love if u explained what are you doing in ur actions
@fayazshams-rd3ek Жыл бұрын
Really really really Great i wish you more success ❤❤❤
@HardeepSingh-ec4zq9 ай бұрын
How can I add percentage button in this program
@server1232 жыл бұрын
intro music name?
@frigontech Жыл бұрын
20:24, do equals without the lambda
@finpas99154 күн бұрын
Great Video. Thank you very much!🙏🙏🙏
@ChudiO4 ай бұрын
Really good tutorial, has helped improve my Python knowledge 😊
@SahilPatel-f4u10 ай бұрын
After lambda add to command is not showing in blue colour
@cannafarmer3 жыл бұрын
Thank you for the videos I like to scan them quick when i'm stuck
@EBKCS_DHRUV_SHARMA Жыл бұрын
man i love you, best is what i think you are!!!!
@iumamaiftikhar Жыл бұрын
sir i have a problem on line 5 iwrote it correct what should i do
@rodinicen68910 ай бұрын
Very nice video! More of this! :D
@patibandlalatha7530 Жыл бұрын
Very much helpful to the python learners
@dieelitezwerge76222 жыл бұрын
thanks for another very nice video😇😉
@KatherineHunt-bz9fg Жыл бұрын
Learning python on a calculator
@abhinavgangwar46907 ай бұрын
Thats a classic chad move
@evoamer268611 ай бұрын
You have made me switch from C# to python my friend
@leadgebrat98802 жыл бұрын
The delete function is not working... Gives an Attribute error
@jokemiri Жыл бұрын
I just completed this. Is it possible to clear the screen after a result when a new number is keyed? Thank you for the tutorial.
@youngistaan5883 Жыл бұрын
And also there should ve back space
@jasongonzalez5026 ай бұрын
Can anyone explain to me how he navigates the code by highlighting a single character then just skimming it? I'm a bit new to coding and am still learning much. - Thanks!
@tortu_nashe Жыл бұрын
nice vid liked n subed , made me feelike programming more
@YukiArtsandCrafts Жыл бұрын
Interesting explanation ❤
@theminecrafttree89132 жыл бұрын
the best tutorial ever bro u da best
@VrUnknown7 ай бұрын
when you put root = tk.Tk() it worked perfectly for you but for me it's says AttributeError: module 'tkinter' has no attribute 'tk'
@zainnusairat77456 ай бұрын
did u import tkinter as tk? otherwise u would have to write tkinter.Tk(), u should import it as tk not to waste time
@exxavier1695 Жыл бұрын
I love the project it was very useful and helpful thanks
@support_gaza Жыл бұрын
How to delete one number?
@sarveshsargunan4914 Жыл бұрын
i learned a lot from this video and i did it myself as well
@joemjencombs82022 жыл бұрын
there is still somehow a small problem with my code, as except additions, nothing else works and it just does (e.g.) 3x3=Error
@onemangamer587 Жыл бұрын
Are you using "*" or "x"? Because "x" will throw an error
@skitmc584210 ай бұрын
17:17 (just a marker so i can skip back into the video without losing where i was before)
@nellcid79092 жыл бұрын
how to fix "text_result" is not defined error?
@googlegoogle16103 жыл бұрын
i like your video but why not to paste the code in the description
@Cheezou.3 жыл бұрын
Where is the code , i wanna compare with mine pls
@ernurernur3032 жыл бұрын
hey guys , how to add backspace function ? if you know pliss
@dedehurairrah43457 ай бұрын
When i click the number are error, can you repair my code?
@mariustrelea51323 жыл бұрын
Can you implement it with constants e and π , and also trigonometric functions
@flowman84143 жыл бұрын
well do try to do it yourself
@mariustrelea51323 жыл бұрын
@@flowman8414 import math has trigonometric functions and also the inverse functions of themselves ?
@flowman84143 жыл бұрын
@@mariustrelea5132 yea i think so
@unknown-cz5yh Жыл бұрын
error is occuring when i am adding 1+1 how to solve this problem
@cheesefries66162 жыл бұрын
could anyone explain more about the text_result.delete(1.0, "error") and text_result.insert(1.0, calculation). I'm confused as hell
@rekhNZ3 жыл бұрын
0:42 when he said nonsense haha
@ኢትዮጵኑብያ Жыл бұрын
It says text result not defiend
@maitruong7909 Жыл бұрын
Awesome! 10 points
@Al_X-200510 ай бұрын
Now that I can make custom buttons I can finally create the Calculator 2
@feliperodrigues32772 жыл бұрын
You're the best one to explain, ty so much man
@himanshuranjansingh61343 жыл бұрын
Thank you man🌻
@bjornofficial59212 жыл бұрын
Everything works except when I press = I get a white screen (It doesn't calculate)
@wise_beanss Жыл бұрын
instead of removing the lambda, try putting evaluate_calculation() it works for me as far as i know
@zhangchill1616 Жыл бұрын
Very simple Thank yous
@Hunter-kd4gi11 ай бұрын
SyntaxError: expected 'except' or 'finally' block
@kingkoller150311 ай бұрын
Great tutorial! But in my case (I don't know why) I have to use lambda for all functions so that it would work. And also the result of the previous calculation isn't transferred to the new one. Does anybody know what's wrong?
@yoriichi_24511 ай бұрын
idk
@fzel111 ай бұрын
show ur code
@br_thinkpad_py Жыл бұрын
what program that using for python?
@jonconstatine14087 ай бұрын
it's an inbuilt python module Called tkinter
@justdaviddd10 ай бұрын
It doesn't open anything, but it also shows that it has zero problems. How to open it