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

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 พ.ย. 2024

ความคิดเห็น • 39

  • @programizstudios
    @programizstudios  2 ปีที่แล้ว +1

    Learn Python with a more hands-on experience with Programiz PRO.
    🚀 Get 60% off on our Lifetime Plan this Black Friday-pay once for skills that last forever. Don’t miss out, it’s a limited-time offer!
    👉 Grab your discount now: bit.ly/blkfriday-py-24-yt

  • @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.

  • @octobrain23232
    @octobrain23232 2 ปีที่แล้ว +1

    The head bobbing is amazing.

  • @chaitanyakumarboddu7117
    @chaitanyakumarboddu7117 3 ปีที่แล้ว +7

    Ur explanation of exceptions is Exceptionally great!!

  • @shakirabowen5459
    @shakirabowen5459 2 ปีที่แล้ว +2

    Simple and easy to understand. Thank you!

  • @umeshnagar4092
    @umeshnagar4092 3 ปีที่แล้ว +1

    Thanks for all your efforts "Team Programiz" 🙌

  • @walexgaming6231
    @walexgaming6231 2 ปีที่แล้ว

    I have an exam tomorrow, hope this clutches up!

  • @pinkshoelace8388
    @pinkshoelace8388 2 ปีที่แล้ว

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

  • @Whatthetrash
    @Whatthetrash ปีที่แล้ว +1

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

  • @aayushkotecha1677
    @aayushkotecha1677 3 ปีที่แล้ว +1

    BEST VIDEO QUALITY

  • @Slicerwolf
    @Slicerwolf 3 ปีที่แล้ว +1

    Very good video. Thanks.

  • @NexGlow18
    @NexGlow18 2 ปีที่แล้ว

    Great, easy to understand

  • @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! :)

  • @aidendouglas8672
    @aidendouglas8672 3 ปีที่แล้ว

    Thank you very helpful

  • @sandipansarkar9211
    @sandipansarkar9211 3 ปีที่แล้ว

    great explanation

  • @cmorris10
    @cmorris10 ปีที่แล้ว

    Thanks

  • @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")

  • @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.

  • @blackshark9708
    @blackshark9708 3 ปีที่แล้ว +1

    Bro,make a video on constructors ❤️, please

  • @jiyashah9194
    @jiyashah9194 3 ปีที่แล้ว

    thank you so much

  • @ZeeHamz
    @ZeeHamz 2 ปีที่แล้ว

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

  • @nathanbridge6057
    @nathanbridge6057 3 ปีที่แล้ว

    cheers

  • @kennercosta7859
    @kennercosta7859 3 ปีที่แล้ว

    NIce nice

  • @kapibara2440
    @kapibara2440 10 หลายเดือนก่อน

    Great Content!

  • @stuartsalazar7319
    @stuartsalazar7319 3 ปีที่แล้ว

    nicee

  • @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.

  • @nostalgiccringeallhailchel3881
    @nostalgiccringeallhailchel3881 ปีที่แล้ว

    2:13

  • @toeflsatgmat3901
    @toeflsatgmat3901 3 ปีที่แล้ว

    👌👌👌

  • @user-gv9if4jx3h
    @user-gv9if4jx3h 3 ปีที่แล้ว +1

    👌🏻

  • @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