AD
CODE:
class E(Exception):
def __init__(self, message):
self.message = message
def __str__(self):
return "It's nice to see you"
try:
print("I feel fine")
raise Exception("what a pity")
except Exception as e:
print(e)
else:
print("the show must go on")
you write the code error, it should be : raise E("what a pity") instead of raise Exception("what a pity") and except E as e: instead of except Exception as e: , so the corrects are : B and D, not A and D
You are right
lass E(Exception):
def __init__(self, message):
self.message = message
def __str__(self):
return "It's nice to see you"
try:
print("I feel fine")
raise E("what a pity")
except Exception as e:
print(e)
else:
print("the show must go on")
Correct is BD
upvoted 1 times
...
...
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
DKAT2023
4 months, 3 weeks agoDave304409
4 months, 3 weeks agoDave304409
4 months, 4 weeks agoDave304409
4 months, 4 weeks agoDKAT2023
5 months agokstr
5 months, 3 weeks agoDKAT2023
4 months, 3 weeks agokstr
4 months, 2 weeks ago