Direction: Choose the correct option
Q1.
What is inheritance in Python?
Direction: Choose the correct option
Q2.
How do you define class B that inherits from class A?
Direction: Choose the correct option
Q3.
What is method overriding?
Direction: Choose the correct option
Q4.
How do you call the parent class's method from the child class?
Direction: Choose the correct option
Q5.
What is multiple inheritance?
Direction: Choose the correct option
Q6.
What is the output of `class A: pass; class B(A): pass; print(issubclass(B, A))`?
Direction: Choose the correct option
Q7.
What is the method resolution order (MRO)?
Direction: Choose the correct option
Q8.
What does `super().__init__()` do in the child's `__init__`?
Direction: Choose the correct option
Q9.
What is the output of `class A: def f(self): return 'A'; class B(A): def f(self): return 'B'; print(B().f())`?
Direction: Choose the correct option
Q10.
What does `isinstance(obj, (A, B))` check?
