
Python InstitutePCAP - Certified Associate Python Programmer
Domain 4Objective 3
PCAP-31-03 4.3 Equip a Class with Methods PCAP-31 Practice Questions (Page 10)
Part of the Object-Oriented Programming domain, which accounts for 34% of the PCAP-31 exam. Python Institute does not publish an official question count, but from its 65-minute exam (~25–45 total, ~9–15 in this domain), expect 2–3 from this objective — we provide 52 practice questions to prepare you well beyond it. (estimate)
52questions here
11free pages
6concepts
34%of the exam
Questions 46–50
- 46
A junior developer is defining a `Logger` class. They want to define a method `log(self, message)` that prints a message. Which code snippet correctly declares this method inside the class body?
Select an answer first - 47
A `User` class has a method `set_name(self, name)` that sets `self.name = name`. After creating `user = User()`, which call correctly sets the user's name to 'Alice'?
Select an answer first - 48
In a `TemperatureSensor` class, the method `read_temp(self)` should return the current temperature stored in the instance attribute `self.temp`. Which method implementation is correct?
Select an answer first - 49
A `Profile` class has a method `display(self)` that needs to call another method `get_email(self)` to show the user's email. Which line inside `display` correctly calls `get_email`?
Select an answer first - 50
A developer is explaining to a colleague the difference between a method and a regular function. Which statement correctly highlights a key difference?
Select an answer first
Finished these 5 questions?
Review the revealed explanations, or continue through the curriculum.
Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by Python Institute. “PCAP-31” is a trademark of its owner, used for identification only.