Exception Handling in Python - PART 3 (Syntax Error, Value Error and Import Error)

preview_player
Показать описание
exceptions:

ZeroDivisionError : division by 0
OSError: _________
ImportError : when an import fails like you have imported math package
butwhen you used that math method then it become non responsive then this error
comes into play
IndexError : it happens in array when an array index is out of range

NameError : when an unknow variable is used in function other than defined variable
(python me you don't have that assumed variable or something like that it is purely defined variable in every case)

SyntaxError : Common Error when you write integer insted of float and assume it to 5.984

TypeError : a funcxtion is called on a value of inappropriate type

ValueError : function is called on value of correct type but with inappropriate value
Рекомендации по теме