Python Exception Handling (Use Try..Except to Catch Errors!) #25

Sdílet
Vložit
  • čas přidán 28. 08. 2024

Komentáře • 39

  • @programizstudios
    @programizstudios  Před 2 lety +1

    🔥Finding it Damn Hard to Understand Python?
    Learn to code-the right way-with interactive lessons, quizzes & challenges. Build a strong programming base; it's IMPORTANT!
    Try Programiz PRO for Free: bit.ly/interactive-py

  • @tusharjajodia9077
    @tusharjajodia9077 Před 3 lety +41

    Let's all appreciate amount of time invested in making these videos

  • @cedricanderson5866
    @cedricanderson5866 Před 3 lety +8

    I am attending Community College on Python and I can not thank you enough for posting this exceptionally wonderful video when i have used the college books provided to me, Googled information on this topic and still was utterly confused.

  • @octobrain23232
    @octobrain23232 Před 2 lety +1

    The head bobbing is amazing.

  • @chaitanyakumarboddu7117
    @chaitanyakumarboddu7117 Před 3 lety +7

    Ur explanation of exceptions is Exceptionally great!!

  • @shakirabowen5459
    @shakirabowen5459 Před 2 lety +2

    Simple and easy to understand. Thank you!

  • @umeshnagar4092
    @umeshnagar4092 Před 3 lety +1

    Thanks for all your efforts "Team Programiz" 🙌

  • @Whatthetrash
    @Whatthetrash Před rokem +1

    I love these videos so much! Thank you for making them. :)

  • @pinkshoelace8388
    @pinkshoelace8388 Před 2 lety

    Here for my daily session of learning python, great video!

  • @Ashok-oe3lo
    @Ashok-oe3lo Před 3 lety

    Awesome video creation, great explanation, thank you very much for your time.

  • @walexgaming6231
    @walexgaming6231 Před rokem

    I have an exam tomorrow, hope this clutches up!

  • @aayushkotecha1677
    @aayushkotecha1677 Před 3 lety +1

    BEST VIDEO QUALITY

  • @Slicerwolf
    @Slicerwolf Před 3 lety +1

    Very good video. Thanks.

  • @ComputerScienceSimplified

    Awesome video, keep up the great work! :)

  • @NexGlow18
    @NexGlow18 Před 2 lety

    Great, easy to understand

  • @pavelboldin7227
    @pavelboldin7227 Před 3 lety

    Here is one small question. How to change this program about numerator and denominator in that way, when in the case of division by zero it will ask once again to enter numerator and denominator, and only in the case of correct answer it will say "The program ends". Thank you.

    • @programizstudios
      @programizstudios  Před 3 lety +1

      You can do something like this:
      def printDivision(numerator, denominator):
      try:
      result = numerator/denominator
      print(result)
      except:
      print("Denominator cannot be 0.")
      while (denominator == 0):
      denominator = int(input("Enter denominator again: "))
      printDivision(numerator, denominator)
      numerator = int(input("Enter numerator: "))
      denominator = int(input("Enter denominator: "))
      printDivision(numerator, denominator)
      print("Program ends")

  • @estebangamez6966
    @estebangamez6966 Před 3 lety

    Hello, thank you for the video but i have a question. Does the try-except functionality will work with any type of error? I ask because this seems like a neat way of avoiding a longer code with an if structure.

  • @blackshark9708
    @blackshark9708 Před 3 lety +1

    Bro,make a video on constructors ❤️, please

  • @sandipansarkar9211
    @sandipansarkar9211 Před 3 lety

    great explanation

  • @cmorris10
    @cmorris10 Před rokem

    Thanks

  • @aidendouglas8672
    @aidendouglas8672 Před 3 lety

    Thank you very helpful

  • @ZeeHamz
    @ZeeHamz Před 2 lety

    what's the difference between except : and except Exception as e: ? please tell me the answer as soon as

  • @jiyashah9194
    @jiyashah9194 Před 2 lety

    thank you so much

  • @praveenbabu8104
    @praveenbabu8104 Před 3 lety +1

    but the code inside finally can also be written outside the finally block .
    so what is the need of finally block?

    • @aayushkotecha1677
      @aayushkotecha1677 Před 3 lety

      TRUE

    • @kenoalbatros
      @kenoalbatros Před 2 lety +2

      I hope you already found the answer but for anybody else wondering:
      Normally the whole program is stopped immediately when an error occures. In this case code written outside the finally block can not be executed anymore. Code inside the finally block will still be executed.

  • @nathanbridge6057
    @nathanbridge6057 Před 3 lety

    cheers

  • @kennercosta7859
    @kennercosta7859 Před 3 lety

    NIce nice

  • @user-gv9if4jx3h
    @user-gv9if4jx3h Před 3 lety +1

    👌🏻

  • @kapibara2440
    @kapibara2440 Před 7 měsíci

    Great Content!

  • @stuartsalazar7319
    @stuartsalazar7319 Před 3 lety

    nicee

  • @toeflsatgmat3901
    @toeflsatgmat3901 Před 3 lety

    👌👌👌

  • @autarroy
    @autarroy Před 3 lety

    Is the app for android free

    • @programizstudios
      @programizstudios  Před 3 lety

      Hi Roy,
      Yes, our basic course in the app is free. For certificate and challenges, you will need to purchase Programiz PRO.

  • @swapnilkamble1180
    @swapnilkamble1180 Před 2 lety

    hai buddha half statu
    no shown figures
    is buddhist people heart and
    our master lord buddha
    is not decorated
    is greate philosophyer
    bro please exite the half statu
    bro
    🙏

  • @certifiedsmartass4122
    @certifiedsmartass4122 Před 2 lety +1

    Bro your videos would be better if you stop turning your head left and right every two seconds.. It is annoying and I cannot keep my focus on screen.

    • @jahspazz6010
      @jahspazz6010 Před 2 lety

      i was looking for this comment LMFAOOOOO