Vidyalelo
Python · Q70

Concept of Object Oriented Programs in Python

Programming · Python · question 70

Q70

What will be the output of the following Python code? class A(): def disp(self): print("A disp()") class B(A): pass obj = B() obj.disp()

A.
Invalid syntax for inheritance
B.
Error because when object is created, argument must be passed
C.
Nothing is printed
D.
A disp()
Answer

Answer: Option D

Solution

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