Secondary Calculator Button Functions - Python Kivy GUI Tutorial #17

Поделиться
HTML-код
  • Опубликовано: 14 ноя 2024

Комментарии • 58

  • @Codemycom
    @Codemycom  4 года назад

    ▶️ 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/3qkAqqQ

  • @falsettoandhighnotes6913
    @falsettoandhighnotes6913 3 года назад +4

    this is just so amazing. I am a 16 year old kid who is trying to learn how to code and your videos are helping me soo much. Your explanations are the best

    • @Codemycom
      @Codemycom  3 года назад

      Very cool, glad you like them!

  • @malcolmnooning2505
    @malcolmnooning2505 4 года назад +6

    For every Button, one can also do
    on_press: root.button_press(self.text)
    since "self" under each "Button" refers to the Button in question in each case.
    Great video series!

    • @Codemycom
      @Codemycom  4 года назад

      yep

    • @bluidguy4007
      @bluidguy4007 3 года назад

      I was trying to figure out a way to do that better, awesome suggestion thanks!!

    • @ABSP5766
      @ABSP5766 Год назад

      Exactly, and the same with the period. After all, what we are passing to the equals function is just a string.

  • @funnyanimals705
    @funnyanimals705 4 года назад +1

    Keep going keep going man ! ... Such a GREAT person like you must be known by everyone .. You started to teach and help people and didn't stop and now look you have the GREATEST AND BIGGEST tkinter course on the internet and it's FREE .. and you didn't even stop you also making kivy with your usual passion on your beautiful face .. I really couldn't help not to write this message for you .. Oneday you will get what you deserve for all what you did for people and students like me for free ..

    • @Codemycom
      @Codemycom  4 года назад

      Thanks! I appreciate that!

  • @joephinazee5422
    @joephinazee5422 4 года назад

    Thank you for the awesome tutorials! One thing to note; the current code does not allow for two floats in the same equation because of the conditional to do nothing if there exists a "."

    • @Codemycom
      @Codemycom  4 года назад

      Yep, it’s a work in progress

  • @roostersson
    @roostersson 2 года назад

    You can combine numbers and symbols into one function as well, just pass in the symbol/numper with the function in the function call. and the function should just add the variable to the end of the string, almost as you have done :)

  • @bluidguy4007
    @bluidguy4007 3 года назад

    If you want to clean it up a little, you could change:
    def remove(self):
    prior= self.ids.calc_input.text
    prior = previous[:-1]
    self.ids.calc_input.text = previous
    to this instead so it will replace the 0 when you remove the last character or sign:
    def remove(self):
    prior= self.ids.calc_input.text
    prior= previous[:-1]
    if previous == "":
    self.ids.calc_input.text = "0"
    else:
    self.ids.calc_input.text = previous

  • @Haitoshi
    @Haitoshi 4 года назад

    Nice one, I can't wait for next video with Kivy.
    Have you ever used PyQt5? I find Kivy much more user friendly. :)
    Thanks again!

    • @Codemycom
      @Codemycom  4 года назад +1

      Yeah I'll be doing PyQT5 videos in the future.

  • @koollucian
    @koollucian 2 года назад

    Great video tutorial on Kivy. I just learned Python and would love to put a GUI on my app projects. There is one thing that I would like to do in your calculator app. Affter validating the result by pressing the = button, can you code it so that the inputbox is cleared when a new number is entered to start a new calculation? In other words, eliminate extra press of 'clear' button. Thank you.

    • @Codemycom
      @Codemycom  2 года назад

      Sure but I don't have a video on that...

    • @koollucian
      @koollucian 2 года назад

      @@Codemycom OK, I finally found the solution: create a bool property; set it to True after pressing the '=' button; fix the values of the buttons accordingly when entering new formula to compute. Works like a charm now..

    • @Codemycom
      @Codemycom  2 года назад

      @@koollucian awesome

  • @hiwab41
    @hiwab41 4 года назад +1

    Nice!

  • @deki90to
    @deki90to 3 года назад +2

    Huh this Kivy is hell. But very good practice.

  • @bassjunias439
    @bassjunias439 2 года назад

    Hi Professor I have a question.
    For you which of Tkinter and Kivy must i learn?
    I'm a student and I would like to start correctly.🤓

  • @dheerajd9965
    @dheerajd9965 4 года назад +1

    Sir we can use eval function, no need to create these functions just pass the equation to the eval function

    • @Codemycom
      @Codemycom  4 года назад +1

      There’s always infinite ways to do anything, these videos are aimed at beginners.

    • @dheerajd9965
      @dheerajd9965 4 года назад

      @@Codemycom Oh okay sir, Thanks for tutorials on kivy I wanted to learn this and i found no tutorials good.

    • @Codemycom
      @Codemycom  4 года назад

      @@dheerajd9965 glad to help

  • @hernangaston4408
    @hernangaston4408 3 года назад

    in the math sign function, can we pass self.text?? like math_sign(self.text). Thaks for the tutorials are awesome!

  • @misfarsiddeek3105
    @misfarsiddeek3105 4 года назад +1

    Woww. This is awesome.
    Bro there is a small bug. How to fix it?
    If we want to the calculation like 2.5 + 2.5 we can't do this. Coz we have written the code before in our dot() function. So that it won't allow to have multiple decimal point numbers. What to do in this case? Looking forward your reply. Thank you.

    • @Codemycom
      @Codemycom  4 года назад +1

      yeah we'll probably get to that

    • @misfarsiddeek3105
      @misfarsiddeek3105 4 года назад

      @@Codemycom ok brother. Thank you ☺️❤️

    • @Codemycom
      @Codemycom  4 года назад +1

      @@misfarsiddeek3105 We're just getting the basic functionality up at this point...once that's done we'll go back and fine tune everything.

    • @misfarsiddeek3105
      @misfarsiddeek3105 4 года назад

      @@Codemycom ok brother. Sure😊😊☺️☺️☺️

    • @misfarsiddeek3105
      @misfarsiddeek3105 3 года назад

      @Thakur Shubham singh thanks.

  • @thomasnowak9825
    @thomasnowak9825 3 года назад

    One thing I noticed is with the +/- button, if I enter 25-6-2, and press the +/- button, the textbox now becomes 2562. Something I'll try to figure out.

    • @pyMarek
      @pyMarek 3 года назад

      @@tomekbk1 "-24-6-2" ? Solution: +/- button must work only for single number but not for mathematical expression.

    • @salvatoregar5832
      @salvatoregar5832 3 года назад

      @@tomekbk1 another problem is prior.split("-") how did you resolve it?

    • @salvatoregar5832
      @salvatoregar5832 3 года назад

      @@tomekbk1 Thank you for the answer, now i try it.

  • @Sergiu-e6b
    @Sergiu-e6b 3 месяца назад

    how does the computer know when you add a negative number to a positive one. You write -3+5. As far as Python knows, that should be -8. What am I missing?

    • @Codemycom
      @Codemycom  3 месяца назад

      that's not how math works. -3 + 5 is 2. -3 + -5 is -8

    • @Sergiu-e6b
      @Sergiu-e6b 3 месяца назад

      ​@@CodemycomWhat I meant was: you said you are adding the minus just as a string and it is in qutation marks. So you are not adding -5 to 3. You are adding minus + five + 3. So as far as Python knows, it should give you an error right? Or -53

  • @faizrehman9773
    @faizrehman9773 4 года назад +1

    John, kindly make a Django beginner series First explain concepts and then put into the project.

  • @iriarte1123581321345
    @iriarte1123581321345 2 года назад

    I know it has been a while, but what is the editor? my ears coulnd't get it. Thank you o/

    • @Codemycom
      @Codemycom  2 года назад

      Sublime text editor and git bash terminal from git-scm.com

  • @محمودعبدالرحمن-ق7ه
    @محمودعبدالرحمن-ق7ه 4 года назад +2

    does Kivy apps work on Android ??

    • @bokkenka
      @bokkenka 4 года назад

      They can. You have to use Buildozer (pypi.org/project/buildozer/) to compile them to something that can run on Android.

    • @Codemycom
      @Codemycom  4 года назад

      yeah

    • @falsettoandhighnotes6913
      @falsettoandhighnotes6913 3 года назад

      yes

  • @jannesbecker8372
    @jannesbecker8372 3 года назад

    When did you do the -,X,/ functions? Where can I find it?

    • @hbarudi
      @hbarudi 2 года назад

      he did them last video quickly and in this video he combined them into a single python kivy function

  • @MajesticRiderTales
    @MajesticRiderTales 4 года назад +1

    Do you know someone who is hiring python developer. Your are a great content creator.

    • @Codemycom
      @Codemycom  4 года назад

      Thanks. No I don't know anyone who is hiring.

  • @papan101
    @papan101 4 года назад

    Sir..Please make a video on how to move sqllite data to any other database like MongoDB!