Комментарии:
# exception = events detected during execution that interrupt the flow of a program
try:
numerator = int(input("Enter a number to divide: "))
denominator = int(input("Enter a number to divide by: "))
result = numerator / denominator
except ZeroDivisionError as e:
print(e)
print("You can't divide by zero! idiot!")
except ValueError as e:
print(e)
print("Enter only numbers plz")
except Exception as e:
print(e)
print("something went wrong :(")
else:
print(result)
finally:
print("This will always execute")
Thanks dude, you always make such understandable video!
ОтветитьU da best sir
Ответитьsiuuu
Ответитьdrop a comment down below
ОтветитьI hope you know how much of a difference you make for people ❤
Ответитьyoyoyoyo bro that was cool
ОтветитьLoved the content
Ответитьur the reason im getting my cs degree.
Ответитьgreat video, i finally got to understand what exception handling is
ОтветитьThanks man
Ответитьtyy
Ответитьthank you bro !
Ответитьok
Ответитьfadaboeba
Ответитьhe sounds like joe form family guy
ОтветитьRight now i'm at my first semester in college and learning python became confusing since my teacher isn't helping much... Thanks to your videos, now I finally understand a lot of stuff. I'm currently studying for my text tomorrow and your videos are helping me a lot!! Thanks for taking your time to explain everything to us, and keep being the goat you are :]
Ответитьexcelent video thank you so much
ОтветитьGreat tutorial, really got to know this concept. Thanks❤
Ответитьthe best
Ответитьhooorayyyyy
ОтветитьWhat does try keywords do?
ОтветитьBro code is great
ОтветитьBro Code ,you're the best
Ответитьby learning what is exception handling i'm one more step closer to getting into machine learning
ОтветитьIf we want to only take the number part when there is an exception, we can say that the user entered the number 21a by mistake. How can we extract only the int part and ignore the string part?
ОтветитьThank you! This got to the point for a beginner like me and it was easy to understand and execute, without exception. Also, can I be a sis, rather than a bro?
ОтветитьThe best video i have watched so far that explains exception handling in very easy to understand way. Thanks Bro, for the video
ОтветитьThank you!
ОтветитьWatched some other tutorials which just weren't clear to me at all, but your tutorial made me fully understand it. Thank you!
ОтветитьI too wanna be a bro❤❤
Ответитьu the best bro code
Ответитьbro is cool
Ответитьtnx
Ответитьthanks bruv
ОтветитьHow would I do it if I want to present an error when the user inputs a number instead of a name
ОтветитьSo cool
Ответитьyour the goat of this generation ;)
ОтветитьThe official docs make a lot of sense now after this video. Thnx!
ОтветитьVery easy to understand ....thank you so much😊
ОтветитьThanks dude
ОтветитьFun fact: an inability to divide by zero is a myth. Common convention says you can't, and that's fine for most framings, but other conventions involve division by zero to equal either zero or infinity. All three options are 'correct' in their own way, with different advantages and disadvantages to each approach.
ОтветитьHere is a comment bro... 😂
Ответитьi learned a lot, thanks
ОтветитьYo bro cool vid
ОтветитьThat is pretty easy to understand that I find my thoughts circling in the class. Thank you bro
ОтветитьQuality content bro
Ответитьguys Im currently following this playlist to learn python, Im just wondering if this is enough for me to start solving leetcode problems or I need to learn more method or syntaxes or something else?
ОтветитьHell yeah!👍 You are the best teacher I've ever found
Ответить# This is a comment
Ответить