class MyClass:
x = 5
obj = MyClass()
print(obj.x)
A) None
B) 5
C) Error
D) 0
✅ B) 5
(Class attributes are accessible via instances.)
A) __init__
B) __new__
C) __start__
D) __call__
✅ A) __init__
(Constructor method initializes the object.)
self
in Python classes?A) Refers to the parent class
B) Refers to the instance of the class
C) A reserved keyword for static methods