Python Python Basics Functions and Looping Exception Flow

Christopher Hill
Christopher Hill
828 Points

I'm confused about how the code is run to print each letter.

I'm confused about how this code is run to print or not to print the different letters.

1 Answer

Steven Parker
Steven Parker
201,932 Points

While code normally executes in top-to-bottom order, if an error occurs inside a "try" block the code immediately jumps to the corresponding "except" statement (skipping anything in between).

It might help to review the previous video with the quiz question in mind.