Examers.io
ExamsOrganizationsHow it worksPricingHelp & FAQ
Python Institute logo

Python InstitutePCAP - Certified Associate Python Programmer

Domain 3Objective 3

PCAP-31-03 3.3 Employ Built-In String Methods PCAP-31 Practice Questions (Page 7)

Part of the Strings domain, which accounts for 18% of the PCAP-31 exam. Python Institute does not publish an official question count, but from its 65-minute exam (~25–45 total, ~5–8 in this domain), expect 2–3 from this objective — we provide 55 practice questions to prepare you well beyond it. (estimate)

55questions here
11free pages
8concepts
18%of the exam

Questions 31–35

  1. 31application · medium

    A list of product codes ['B2', 'A1', 'C3'] must be sorted in reverse alphabetical order and then joined with a comma and space to produce a single string. Which code does this?

    Select an answer first
  2. 32application · medium

    A parser must locate the first occurrence of the substring '<!--' in an HTML comment string. If the substring is not found, the script should catch an exception. Which method is most appropriate?

    Select an answer first
  3. 33application · medium

    A CSV line 'John,Doe,35,NY' needs to be split into fields, but only the first two fields are needed. Which code correctly extracts 'John' and 'Doe'?

    Select an answer first
  4. 34application · easy

    A user input string may contain leading and trailing asterisks (*) that need to be removed, but internal asterisks must be preserved. Which method should be used?

    Select an answer first
  5. 35application · medium

    A validation function must ensure a password contains at least one uppercase letter and at least one digit. Which condition correctly checks this?

    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.