Vidyalelo
Python · Q53

Concept of Object Oriented Programs in Python

Programming · Python · question 53

Q53

What will be the output of the following Python code? class Demo: def __check(self): return " Demo's check " def display(self): print(self.check()) class Demo_Derived(Demo): def __check(self): return " Derived's check " Demo().display() Demo_Derived().display()

A.
Demo's check Derived's check
B.
Demo's check Demo's check
Answer
C.
Derived's check Demo's check
D.
Syntax error

Answer: Option B

Solution

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