Certified Professional in Python Programming (PCPP-32-101) — Question 23

What is a method?

Answer options

Correct answer: A

Explanation

The correct answer, A, accurately describes a method as a function associated with a class or its instances. Options B, C, and D contain inaccuracies; B incorrectly states that methods cannot be abstract, C mischaracterizes methods as callable variables, and D wrongly claims that methods must always return a value.