Vidyalelo
Python · Q57

Classes and Objects in Python

Programming · Python · question 57

Q57

What is the output of the following code:class Parent: x = 10class Child(Parent): passobj = Child()print(obj.x)

A.
10
Answer
B.
An error will occur
C.
obj
D.
Child

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board