Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Basics Functions and Looping Exception Flow

Not able to understand this question even after reviewing the video

Can you add more resources for error handling?

2 Answers

Sometimes things are connected, sometimes they just come one after the other. So it's easier to always go step by step.

The first thing this code does is print "A" on the screen.

Moving on, it enters the try block. On the first line of the block, we have a variable being assigned to the sum between a string and an integer. That's not supported. So "B" is not gonna be printed and we're gonna move on to the exception handlers.

Do you wanna go on from here?

Thanks for the explanation!

Sure... If you need help to finish it just ask here.