Why does Python abandon the rest of a try block the instant a line raises — and where exactly does execution land?
Short drills on what this video just taught. Write the code, run the checks, and reveal the answer only if you are stuck.
Each of these snippets raises an exception the moment it runs:
nums = [10, 20, 30], then nums[7]'total: ' + 5int('hello')print(subtotal), where subtotal was never definedAssign to exception_names a list of four strings naming the exception each snippet raises, in that same order. Spell each name the way Python spells it (the way KeyboardInterrupt is spelled — capitals and no spaces).