Direction: Choose the correct option
Q1.
How do you create an instance of a class `MyClass` in Python?
Direction: Choose the correct option
Q2.
What is the `__init__` method used for?
Direction: Choose the correct option
Q3.
What is `self` in a class method?
Direction: Choose the correct option
Q4.
What is the output of `class A: x=5; print(A.x)`?
Direction: Choose the correct option
Q5.
How do you access an instance variable from within a method?
Direction: Choose the correct option
Q6.
What is the purpose of `@classmethod`?
Direction: Choose the correct option
Q7.
What is the purpose of `@staticmethod`?
Direction: Choose the correct option
Q8.
What does `isinstance(obj, MyClass)` do?
Direction: Choose the correct option
Q9.
What is inheritance in Python?
Direction: Choose the correct option
Q10.
How do you define class B that inherits from class A?
