MCQs > IT & Programming > Python > Correct answer from the given options. class ErrorInCode(Exception): def __init__(self, data): self.data = data def __str__(self): return repr(self.data) try: raise ErrorInCode(1000) except ErrorInCode as ae: print ('0'ae.data) finally: print ('1')

Python MCQs

Find the output of the following Python code and choose the correct answer from the given options.

class ErrorInCode(Exception):

  def __init__(self, data):

      self.data = data

  def __str__(self):

    return repr(self.data)

try:

raise ErrorInCode(1000)

except ErrorInCode as ae:

print ("0",ae.data)

finally:

print ("1")


Answer

Correct Answer:

1000

1


Explanation:

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

More Python MCQ Questions

search

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it