Math Calculator Buttons With eval() - Python Kivy GUI Tutorial #19

in #programming3 years ago

In this video we'll finish our calculator's math buttons using the Python eval() function.

Eval() will take a string and break it apart and evaluate it, ie do the math.

So we don't have to write code for each of the buttons (add, subtract, multiply, divide), eval will take care of all of it for us.

✅ Watch The Kivy Playlist
https://bit.ly/37LrJ27

▶️ Get The Code
https://bit.ly/31QeMjM

✅ Subscribe To My YouTube Channel:
http://bit.ly/2IGzvOR

▶️ See More At:
https://Codemy.com

✅ Join My Facebook Group:
http://bit.ly/2GFmOBz

▶️ Learn to Code at https://Codemy.com
Take $22 off with coupon code: youtube

✅ Buy a Codemy T-Shirt!
http://bit.ly/2VC9WUN

Sort:  

@codemy Your post cointains some text that could be a potential attempt to inject malicious code.

Investigation in progress..

Please forgive any false positives.
More info: https://hive.blog/hive-139531/@keys-defender/new-feature-code-injections-attempts-detection-xss-sql-injections-csrf
This message is self-voted to be more visible among others.

@keys-defender

Nope, you're wrong...

Confirmed, false positive.   =]