Vidyalelo
Python · Q78

Concept of Object Oriented Programs in Python

Programming · Python · question 78

Q78

What will be the output of the following Python code? class A: def one(self): return self.two() def two(self): return 'A' class B(A): def two(self): return 'B' obj2=B() print(obj2.two())

A.
A
B.
An exception is thrown
C.
A B
D.
B
Answer

Answer: Option D

Solution

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