12 OOP & Dunder Methods questions from the Python bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.
Free to start: the 2-minute IT readiness check — six questions and a result.
A.the linearized sequence, computed by C3, that determines which inherited attribute a class uses
B.a class attribute that fixes the allowed instance attributes and avoids a per-instance dictionary to save memory
C.the method returning an unambiguous developer-facing representation, ideally one that could recreate the object
D.the method invoked automatically to initialize a newly created instance's attributes
Answer + AI explanation with Pro
2. Which term means: "the method invoked automatically to initialize a newly created instance's attributes"?
Junior
A.__repr__
B.__slots__
C.__init__
D.method resolution order
Answer + AI explanation with Pro
3. Which statement is correct?
Junior
A.__init__ — the linearized sequence, computed by C3, that determines which inherited attribute a class uses
B.__init__ — a class attribute that fixes the allowed instance attributes and avoids a per-instance dictionary to save memory
C.__init__ — the method invoked automatically to initialize a newly created instance's attributes
D.__init__ — the method returning an unambiguous developer-facing representation, ideally one that could recreate the object
Answer + AI explanation with Pro
4. What is __repr__?
Mid
A.the linearized sequence, computed by C3, that determines which inherited attribute a class uses
B.the method returning an unambiguous developer-facing representation, ideally one that could recreate the object
C.a class attribute that fixes the allowed instance attributes and avoids a per-instance dictionary to save memory
D.the method invoked automatically to initialize a newly created instance's attributes
Answer + AI explanation with Pro
5. Which term means: "the method returning an unambiguous developer-facing representation, ideally one that could recreate the object"?
Mid
A.method resolution order
B.__init__
C.__slots__
D.__repr__
Answer + AI explanation with Pro
6. Which statement is correct?
Mid
A.__repr__ — the linearized sequence, computed by C3, that determines which inherited attribute a class uses
B.__repr__ — a class attribute that fixes the allowed instance attributes and avoids a per-instance dictionary to save memory
C.__repr__ — the method returning an unambiguous developer-facing representation, ideally one that could recreate the object
D.__repr__ — the method invoked automatically to initialize a newly created instance's attributes
Answer + AI explanation with Pro
7. What is method resolution order?
Senior
A.the method returning an unambiguous developer-facing representation, ideally one that could recreate the object
B.the linearized sequence, computed by C3, that determines which inherited attribute a class uses
C.the method invoked automatically to initialize a newly created instance's attributes
D.a class attribute that fixes the allowed instance attributes and avoids a per-instance dictionary to save memory
Answer + AI explanation with Pro
8. Which term means: "the linearized sequence, computed by C3, that determines which inherited attribute a class uses"?
Senior
A.method resolution order
B.__slots__
C.__repr__
D.__init__
Answer + AI explanation with Pro
9. Which statement is correct?
Senior
A.method resolution order — the method returning an unambiguous developer-facing representation, ideally one that could recreate the object
B.method resolution order — a class attribute that fixes the allowed instance attributes and avoids a per-instance dictionary to save memory
C.method resolution order — the linearized sequence, computed by C3, that determines which inherited attribute a class uses
D.method resolution order — the method invoked automatically to initialize a newly created instance's attributes
Answer + AI explanation with Pro
10. What is __slots__?
Senior
A.the method invoked automatically to initialize a newly created instance's attributes
B.the linearized sequence, computed by C3, that determines which inherited attribute a class uses
C.a class attribute that fixes the allowed instance attributes and avoids a per-instance dictionary to save memory
D.the method returning an unambiguous developer-facing representation, ideally one that could recreate the object
Answer + AI explanation with Pro
11. Which term means: "a class attribute that fixes the allowed instance attributes and avoids a per-instance dictionary to save memory"?
Senior
A.__slots__
B.method resolution order
C.__repr__
D.__init__
Answer + AI explanation with Pro
12. Which statement is correct?
Senior
A.__slots__ — the method invoked automatically to initialize a newly created instance's attributes
B.__slots__ — a class attribute that fixes the allowed instance attributes and avoids a per-instance dictionary to save memory
C.__slots__ — the method returning an unambiguous developer-facing representation, ideally one that could recreate the object
D.__slots__ — the linearized sequence, computed by C3, that determines which inherited attribute a class uses
Answer + AI explanation with Pro
Free to start
Start with a free readiness check
Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every OOP & Dunder Methods question come with Pro.