QuestionQ45

VerifiedExceptions

Which statements are true about the following code snippet?

Question Image

Choose two
Explanation

The raise E(...) statement creates an exception that is caught by except Exception as e because E inherits from Exception. The program prints I feel fine before raising the exception, and print(e) uses the overridden __str__ method, producing it's nice to see you.

Community Discussion

No comments yet. Be the first to start the discussion!