
Python InstitutePCAP - Certified Associate Python Programmer
Domain 3Objective 2
PCAP-31-03 3.2 Operate on Strings PCAP-31 Practice Questions (Page 4)
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 22 practice questions to prepare you well beyond it. (estimate)
22questions here
5free pages
10concepts
18%of the exam
Questions 16–20
- 16
What does the ord() function return when passed a single-character string in Python?
Select an answer first - 17
What is the result of the expression "ell" in "hello"?
Select an answer first - 18
A developer writes the following code to build a string of repeated greetings: ```python greeting = 'Hi' result = '' for i in range(3): result += greeting ``` What is the value of `result` after this loop, and why does this work?
Select an answer first - 19
What happens when you execute the following code? s = "hello" s[0] = 'H'
Select an answer first - 20
A developer needs to find the position of the first digit in a string `s`. Which code snippet correctly accomplishes 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.