Examers.io
ExamsOrganizationsHow it worksPricingHelp & FAQ
Python Institute logo

Python InstitutePCAP - Certified Associate Python Programmer

Domain 4Objective 6

PCAP-31-03 4.6 Construct and Initialize Objects PCAP-31 Practice Questions (Page 5)

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 48 practice questions to prepare you well beyond it. (estimate)

48questions here
10free pages
5concepts
34%of the exam

Questions 21–25

  1. 21application · easy

    A developer is writing code to create a new user account object. The User class has an __init__ method that requires a username and email. Which line of code correctly creates a User object with username 'alice' and email 'alice@example.com'?

    Select an answer first
  2. 22application · medium

    A developer is implementing a class to represent a bank account. The __init__ method should set an instance attribute balance to an initial value passed as an argument. Which code snippet correctly binds the attribute to the instance?

    Select an answer first
  3. 23application · easy

    A developer defines a simple class called Product with no __init__ method. They then create an instance with product = Product(). What happens?

    Select an answer first
  4. 24application · medium

    A developer needs to create a class named Employee where each employee object must have a name and an employee ID, both provided at the time of creation. Which constructor declaration is correct?

    Select an answer first
  5. 25application · easy

    A developer is creating a class for a point in 2D space. The constructor should accept x and y coordinates as arguments. Which code snippet correctly initializes a Point object with x=3 and y=4?

    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.