PCAP String methods Practice Question
Which THREE of the following are valid string methods in Python? (Choose three.)
⚠ Common exam trap
Python Institute tests exact method names. The trap is that .swapcase() is a valid method, so candidates may incorrectly exclude it if they think only two are valid. Additionally, .uppercase() and .titlecase() are common confusions with the real methods .upper() and .title().
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
.capitalize()
All three options A, B, and E are valid Python string methods. .capitalize() returns a copy of the string with its first character capitalized and the rest lowercased. .lower() returns a copy of the string with all characters converted to lowercase. .swapcase() returns a copy of the string with uppercase characters converted to lowercase and vice versa. Options C and D are incorrect because .uppercase() and .titlecase() are not valid Python string methods; the correct methods are .upper() and .title(). Although the question asks to choose two, note that .swapcase() is also a valid method, making three correct options. In such cases, any two of the three valid methods would be acceptable, but the intended correct answers are A, B, and E.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
.capitalize()
Why this is correct
.capitalize() is a built-in string method that capitalizes the first character and lowercases the rest.
- ✓
.lower()
Why this is correct
.lower() is a built-in string method that converts all characters to lowercase.
- ✗
.uppercase()
Why it's wrong here
.uppercase() is not a valid Python string method; the correct method is .upper().
- ✗
.titlecase()
Why it's wrong here
.titlecase() is not a valid Python string method; the correct method is .title().
- ✓
.swapcase()
Why this is correct
.swapcase() is a built-in string method that swaps the case of each character.
Go deeper
Related to this question
About these practice questions
Courseiva writes every PCAP question from scratch — 421 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PCAP practice question is part of Courseiva's free Python Institute certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCAP exam.