▶️ Watch Entire Kivy Playlist ✅ Subscribe To My RUclips Channel: bit.ly/37LrJ27 bit.ly/2IGzvOR ▶️ See More At: ✅ Join My Facebook Group: Codemy.com bit.ly/2GFmOBz ▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt! Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN ▶️ Get The Code bit.ly/39Oi8Z8
Hands Down the Best Tutorial Ever !! No perplexing, no confusions just a plain, easy and nice approach to teach the stuff !! Keep up the good work.👍👍👌👌😎😎
I look forward to taking lunch breaks just to watch your videos. I love all your teachings! Also, I completed my percentage button. Probably use some tweaking, but it works as is. def percentage(self): if self.answer == '0': pass else: self.answer = self.answer / 100 self.ids.calc_input.text = str(self.answer) self.answer = '0'
Thanks for the lesson and mad props to all the calculator creators out there. It it is fun to see how easy one missed function can break/fix a whole lot of things.
Good Kivy tutorial. Division needs some work. When the answer goes on forever past the decimal, eval() works, but in the calculator, what's displayed is just part of the answer, like the last three digits of 0.8333333333333334 for "5/6". If you print the answer it's right but it doesn't display right in the calculator. Solved by using the round() function built into Python.
wow! for totally random comment to come across in youtube, this was mind blowing haha. I've only been python coding self taught for 3 years, and i run into problems with floats all the time example f = 3.2 + 3.2 + 3.2 print(float(f)) output: 9.600000000000001 lol wtf, I never knew about the round function until today, maybe its something so basic but i didnt know it! anyway, thanks for your comment! haha 😀
Funny thing in programming world is this surprised face when you don't expect something to work, or like in this case work so well xD Thank you very much for presenting us these things in such simple manner, and i'm glad your dog is fine!
Percentage function with '+' and '-' operations. For example: 90 + 10% of 90 = 99. It can be modified further in similar way: def percentage(self): global result, result2 prior = self.ids.calc_input.text if '+' in prior: result = prior.split('+') else: result2 = prior.split('-') if prior == '0': pass elif '-' in prior and len(result2) == 2: result3 = float(result2[0]) - (float(result2[0]) / 100)*float(result2[-1]) self.ids.calc_input.text = str(round(result3, 3)) elif '+' in prior and len(result) == 2: result4 = float(result[0]) + (float(result[0]) / 100)*float(result[-1]) self.ids.calc_input.text = str(round(result4, 3))
I challenge all of you to code overflow error. The logic is pretty simple. If the answer is more than 12 digits, it will output an error, just like standard calculator. For example, 99999999*99999999 = Error.
Hi John,thanks for uploading these videos. I really learn a lot with them I have a question: can you import "special" functions like sin,cos,exponential,etc and place them in the calculator?
Hi John Love all the work you do. I'm an IT teacher and you're the #1 place I send my students to understand Python GUI programming. Mate, I seem to get really weird values when I divide by 3. For example 10/3 will give 335, 7/3 = 335. 10/6 = 667. Any ideas what I've done wrong?
Basically it's because the answer is so long that it can't fit the textbox. For example 10/6 is 1.66666666666666666666666666666667. You can round the answer, for example to 10 digits, to fit in the textbox.
Actually it doesn't mean modulo in normal calculator. But in Python and other prog languages, yes it's modulo. So it's up to you to interpret. And yes // is floor div
Maybe you fix this in a later video, but a subtraction operator will simply be deleted from the text input if you press the +/- button. So "3*5-10" will become "3*510". Do I have that right?
I am getting below error message during execution with eval() function . May kindly please help fixing the issue. AttributeError: 'super' object has no attribute '__getattr__'
I've been watching your videos. And I seem to not be able to figure out how to clear the text input automatically after the answer has been displayed, when the user will enter another set of numbers, without pressing the C button.
Check to see if the next button after the answer is displayed is a number. If so, clear the text box before adding the number to it. I know your question is a year old, but that's how I would do it.
Probably "someone" that said to you is already "attached" to a certain programming language and find it useful, that's why for him/her learning something python is just a waste of time.
hello , I change the color's button in kivy file whit canvas , but I want to change the colour of button when pressing this , but I can't . can you help me , thank you sir :)
▶️ Watch Entire Kivy Playlist ✅ Subscribe To My RUclips Channel:
bit.ly/37LrJ27 bit.ly/2IGzvOR
▶️ See More At: ✅ Join My Facebook Group:
Codemy.com bit.ly/2GFmOBz
▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt!
Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN
▶️ Get The Code
bit.ly/39Oi8Z8
Sir, can binding of buttons is possible in Kivy as it can be done in tkinter
Hands Down the Best Tutorial Ever !! No perplexing, no confusions just a plain, easy and nice approach to teach the stuff !! Keep up the good work.👍👍👌👌😎😎
Thanks! Glad you enjoyed it!
I look forward to taking lunch breaks just to watch your videos. I love all your teachings! Also, I completed my percentage button. Probably use some tweaking, but it works as is.
def percentage(self):
if self.answer == '0':
pass
else:
self.answer = self.answer / 100
self.ids.calc_input.text = str(self.answer)
self.answer = '0'
Nice!
Getting error
Thanks for the lesson and mad props to all the calculator creators out there. It it is fun to see how easy one missed function can break/fix a whole lot of things.
For sure
Good Kivy tutorial. Division needs some work. When the answer goes on forever past the decimal, eval() works, but in the calculator, what's displayed is just part of the answer, like the last three digits of 0.8333333333333334 for "5/6". If you print the answer it's right but it doesn't display right in the calculator. Solved by using the round() function built into Python.
Yes that's the way you do it
wow! for totally random comment to come across in youtube, this was mind blowing haha. I've only been python coding self taught for 3 years, and i run into problems with floats all the time
example
f = 3.2 + 3.2 + 3.2
print(float(f))
output: 9.600000000000001
lol wtf, I never knew about the round function until today, maybe its something so basic but i didnt know it!
anyway, thanks for your comment! haha 😀
Funny thing in programming world is this surprised face when you don't expect something to work, or like in this case work so well xD
Thank you very much for presenting us these things in such simple manner, and i'm glad your dog is fine!
Thanks! Glad you're enjoying the videos!
Thank you very much. I've learned many things from your series...
You're very welcome!
Another alternative for division:
if '/' in prior:
num_list = prior.split('/')
answer = 1
for number in num_list:
answer = int(num_list[0]) / int(num_list[1])
self.ids.calc_input.text = str(answer)
Percentage function with '+' and '-' operations. For example: 90 + 10% of 90 = 99. It can be modified further in similar way:
def percentage(self):
global result, result2
prior = self.ids.calc_input.text
if '+' in prior:
result = prior.split('+')
else:
result2 = prior.split('-')
if prior == '0':
pass
elif '-' in prior and len(result2) == 2:
result3 = float(result2[0]) - (float(result2[0]) / 100)*float(result2[-1])
self.ids.calc_input.text = str(round(result3, 3))
elif '+' in prior and len(result) == 2:
result4 = float(result[0]) + (float(result[0]) / 100)*float(result[-1])
self.ids.calc_input.text = str(round(result4, 3))
I challenge all of you to code overflow error. The logic is pretty simple. If the answer is more than 12 digits, it will output an error, just like standard calculator. For example, 99999999*99999999 = Error.
Hi John,thanks for uploading these videos. I really learn a lot with them
I have a question: can you import "special" functions like sin,cos,exponential,etc and place them in the calculator?
Sure, just like you would with any python program
Me watching this video. Suddenly a load shedding occars . Wi-Fi turn off. I make the calculator without watching this video. Yay!
Awesome
Hi John
Love all the work you do. I'm an IT teacher and you're the #1 place I send my students to understand Python GUI programming.
Mate, I seem to get really weird values when I divide by 3. For example 10/3 will give 335, 7/3 = 335. 10/6 = 667. Any ideas what I've done wrong?
That's weird...try converting either the original numbers or answers to a float. float(answer)
Basically it's because the answer is so long that it can't fit the textbox. For example 10/6 is 1.66666666666666666666666666666667. You can round the answer, for example to 10 digits, to fit in the textbox.
6:20 i think it is supposed to mean modulo but im not sure
and also "//" is floor div
Actually it doesn't mean modulo in normal calculator. But in Python and other prog languages, yes it's modulo. So it's up to you to interpret. And yes // is floor div
Good job master!!!
Thanks!
Your helping alot thx 😊😊😊💖
Happy to help
Maybe you fix this in a later video, but a subtraction operator will simply be deleted from the text input if you press the +/- button. So "3*5-10" will become "3*510".
Do I have that right?
doesn't appear to be right, no.
I am getting below error message during execution with eval() function . May kindly please help fixing the issue.
AttributeError: 'super' object has no attribute '__getattr__'
I've been watching your videos. And I seem to not be able to figure out how to clear the text input automatically after the answer has been displayed, when the user will enter another set of numbers, without pressing the C button.
Check to see if the next button after the answer is displayed is a number. If so, clear the text box before adding the number to it. I know your question is a year old, but that's how I would do it.
I recently started learning Kivy and someone said that learning UI framework in python is just a waste of time. Is this true?
Why would that possibly be true? Lol
Probably "someone" that said to you is already "attached" to a certain programming language and find it useful, that's why for him/her learning something python is just a waste of time.
hello , I change the color's button in kivy file whit canvas , but I want to change the colour of button when pressing this , but I can't .
can you help me , thank you sir :)
I believe I have a video on that in the playlist
@@Codemycom Thank you very much, I am looking forward to your video
There is an error
Can you please try 6/9
It's 0.6666666667. What did you get?
First
nice!
hi teacher the you wolf is very beautiful
thanks!
@@Codemycom why you aren't running the application on the android or phone
@@عالمالبرمجةالعربي Because I'm doing it on a pc