Python_Institute
PCPP-32-101 · Question #48
What is a method?
The correct answer is A. It is a function built into a class that is executed on behalf of the class or an object. A method is a function defined within a class that operates on instances of the class or the class itself, typically invoked on an object or the class.
Advanced OOP
Question
What is a method?
Options
- AIt is a function built into a class that is executed on behalf of the class or an object.
- BIt is another name for a function - the only difference is that a method cannot be abstract.
- CIt is a callable variable that is specific only to objects.
- DIt is another name for a function - the only difference is that a method always returns a value.
How the community answered
(49 responses)- A90% (44)
- B6% (3)
- C2% (1)
- D2% (1)
Explanation
A method is a function defined within a class that operates on instances of the class or the class itself, typically invoked on an object or the class.
Topics
#methods#classes#OOP fundamentals#callable
Community Discussion
No community discussion yet for this question.