file ""line in typeerrorcan only concatenate list (not "int"to list lst add traceback (most recent call last)file ""line in attributeerror'listobject has no attribute 'addd {' ''hello' [' 'traceback (most recent call last)file ""line in keyerror'bprint(this_is_not_a_vartraceback (most recent call last)file ""line in nameerrorname 'this_is_not_a_varis not defined sometimes these exceptions are indicators of something wrong in our program (in which case we would go to the indicated line number and fix it)but they also occur in legitimate situations zerodivisionerror doesn' always mean we received an invalid input it could also mean we have received different input the user may have entered zero by mistakeor on purposeor it may represent legitimate valuesuch as an empty bank account or the age of newborn child you may have noticed all the preceding built-in exceptions end with the name error in pythonthe words error and exception are used almost interchangeably errors are sometimes considered more dire than exceptionsbut they are dealt with in exactly the same way indeedall the error classes in the preceding example have exception (which extends baseexceptionas their superclass raising an exception we'll get to handling exceptions in minutebut firstlet' discover what we should do if we're writing program that needs to inform the user or calling function that the inputs are somehow invalid wouldn' it be great if we could use the same mechanism that python useswellwe canhere' simple class that adds items to list only if they are even numbered integers