they arethe only substantially complex thing about them is how they are identified the next continues our exploration by describing how to implement exception objects of your ownas you'll seeclasses allow you to code new exceptions specific to your programs before we move aheadthoughlet' work through the following short quiz on the basics covered here test your knowledgequiz what is the try statement for what are the two common variations of the try statement what is the raise statement for what is the assert statement designed to doand what other statement is it like what is the with/as statement designed to doand what other statement is it liketest your knowledgeanswers the try statement catches and recovers from exceptions--it specifies block of code to runand one or more handlers for exceptions that may be raised during the block' execution the two common variations on the try statement are try/except/else (for catching exceptionsand try/finally (for specifying cleanup actions that must occur whether an exception is raised or notthrough python these were separate statements that could be combined by syntactic nestingin and laterexcept and finally blocks may be mixed in the same statementso the two statement forms are merged in the merged formthe finally is still run on the way out of the tryregardless of what exceptions may have been raised or handled in factthe merged form is equivalent to nesting try/except/else in try/finallyand the two still have logically distinct roles the raise statement raises (triggersan exception python raises built-in exceptions on errors internallybut your scripts can trigger built-in or user-defined exceptions with raisetoo the assert statement raises an assertionerror exception if condition is false it works like conditional raise statement wrapped up in an if statementand can be disabled with - switch the with/as statement is designed to automate startup and termination activities that must occur around block of code it is roughly like try/finally statement in that its exit actions run whether an exception occurred or notbut it allows richer object-based protocol for specifying entry and exit actionsand may reduce exception coding details