QuestionQ45Verified/ExceptionsCopy linkReport a problemAsk AstroTutorSave questionWhich statements are true about the following code snippet? Choose twoAthe code will output the following string: what a pityBthe code will output the following string: it's nice to see youCthe code will raise an unhandled exceptionDthe code will output the following string: I feel fineShow AnswerAnswerExplanationThe 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.Show comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion