PCPP 32 10x PCPP Certified Professional Python Programmer 1 · Free Practice Question Easy
Question 14
In Python, when a method is called on an instance of a class, what is the first argument that the method receives by default?
-
A
The instance of the class (
self) -
B
The first argument explicitly passed in the method call
-
C
The class object
-
D
The name of the method
Reveal correct answer
Correct answer: A
A.
In Python, when a method is called on an instance of a class, the instance (self) is automatically passed as the first argument to the method.
B.
The first explicit argument comes after self.
C.
The class object is not the first argument; it's the instance (self).
D.
The name of the method is not passed as an argument.
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
