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

Поділитися
Вставка
  • Опубліковано 15 вер 2024

КОМЕНТАРІ • 39

  • @programizstudios
    @programizstudios  2 роки тому +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 3 роки тому +41

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

  • @cedricanderson5866
    @cedricanderson5866 3 роки тому +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.

  • @chaitanyakumarboddu7117
    @chaitanyakumarboddu7117 3 роки тому +7

    Ur explanation of exceptions is Exceptionally great!!

  • @shakirabowen5459
    @shakirabowen5459 2 роки тому +2

    Simple and easy to understand. Thank you!

  • @octobrain23232
    @octobrain23232 2 роки тому +1

    The head bobbing is amazing.

  • @umeshnagar4092
    @umeshnagar4092 3 роки тому +1

    Thanks for all your efforts "Team Programiz" 🙌

  • @Whatthetrash
    @Whatthetrash Рік тому +1

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

  • @pinkshoelace8388
    @pinkshoelace8388 2 роки тому

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

  • @walexgaming6231
    @walexgaming6231 Рік тому

    I have an exam tomorrow, hope this clutches up!

  • @Ashok-oe3lo
    @Ashok-oe3lo 3 роки тому

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

  • @ComputerScienceSimplified
    @ComputerScienceSimplified 3 роки тому +1

    Awesome video, keep up the great work! :)

  • @Slicerwolf
    @Slicerwolf 3 роки тому +1

    Very good video. Thanks.

  • @NexGlow18
    @NexGlow18 2 роки тому

    Great, easy to understand

  • @aayushkotecha1677
    @aayushkotecha1677 3 роки тому +1

    BEST VIDEO QUALITY

  • @cmorris10
    @cmorris10 Рік тому

    Thanks

  • @aidendouglas8672
    @aidendouglas8672 3 роки тому

    Thank you very helpful

  • @sandipansarkar9211
    @sandipansarkar9211 3 роки тому

    great explanation

  • @blackshark9708
    @blackshark9708 3 роки тому +1

    Bro,make a video on constructors ❤️, please

  • @estebangamez6966
    @estebangamez6966 3 роки тому

    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.

  • @pavelboldin7227
    @pavelboldin7227 3 роки тому

    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  3 роки тому +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")

  • @ZeeHamz
    @ZeeHamz 2 роки тому

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

  • @jiyashah9194
    @jiyashah9194 2 роки тому

    thank you so much

  • @kapibara2440
    @kapibara2440 8 місяців тому

    Great Content!

  • @nathanbridge6057
    @nathanbridge6057 3 роки тому

    cheers

  • @praveenbabu8104
    @praveenbabu8104 3 роки тому +1

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

    • @aayushkotecha1677
      @aayushkotecha1677 3 роки тому

      TRUE

    • @kenoalbatros
      @kenoalbatros 2 роки тому +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.

  • @kennercosta7859
    @kennercosta7859 3 роки тому

    NIce nice

  • @user-gv9if4jx3h
    @user-gv9if4jx3h 3 роки тому +1

    👌🏻

  • @stuartsalazar7319
    @stuartsalazar7319 3 роки тому

    nicee

  • @toeflsatgmat3901
    @toeflsatgmat3901 3 роки тому

    👌👌👌

  • @autarroy
    @autarroy 3 роки тому

    Is the app for android free

    • @programizstudios
      @programizstudios  3 роки тому

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

  • @swapnilkamble1180
    @swapnilkamble1180 2 роки тому

    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 2 роки тому +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 2 роки тому

      i was looking for this comment LMFAOOOOO