MCQs > IT & Programming > Python > In the following code, what will be printed ? class parent: def __init__(self, param): self.v1 = param class child(parent): def __init__(self, param): self.v2 = param obj = child(5) print '%d %d' % (obj.v1, obj.v2)

Python MCQs

In the following code, what will be printed ? class parent: def __init__(self, param): self.v1 = param class child(parent): def __init__(self, param): self.v2 = param obj = child(5) print "%d %d" % (obj.v1, obj.v2)

Answer

Correct Answer: AttributeError will be raised.

Explanation:

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

search

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it