Vidyalelo
Python · Q29

Classes and Objects in Python

Programming · Python · question 29

Q29

What is the output of the following code:class MyClass: x = 5obj = MyClass()print(obj.x)

A.
5
B.
An error will occur
C.
obj
Answer
D.
MyClass

Answer: Option C

Solution

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