Does Try/Except always need to be in a function?

I think I understand. This one is tricky because in the example the try except statements are part of the function. In the exercise they are not. Does that sound right?

Agree, the sample code and lesson did not provide enough to complete the exercise. I set it up like the sample and had to use the hints to figure it out. It made sense after I used the hints. Basically it…calls the function created with the value created which will throw an exception and then prints the error message.