Direction: Choose the correct option
Q1.
What is polymorphism in OOP?
Direction: Choose the correct option
Q2.
What is method overloading in Python?
Direction: Choose the correct option
Q3.
What does duck typing mean?
Direction: Choose the correct option
Q4.
What is the result of `len('hello')` and `len([1,2])`?
Direction: Choose the correct option
Q5.
How can you enforce that a subclass implements a particular method?
Direction: Choose the correct option
Q6.
What is the purpose of `isinstance(obj, cls)`?
Direction: Choose the correct option
Q7.
What does the `+` operator demonstrate?
Direction: Choose the correct option
Q8.
What is the output of `class A: def f(self): return 'A'; class B: def f(self): return 'B'; objects = [A(), B()]; [o.f() for o in objects]`?
Direction: Choose the correct option
Q9.
What is operator overloading?
Direction: Choose the correct option
Q10.
How do you define `+` for a custom class?
