Question 331 of 169
Boolean-Returning String Methods: startswith, islower, isalpha
Which THREE methods return a boolean value?
Quick Answer
The answer is str.isalpha(), along with str.startswith() and str.islower(), as these are three boolean-returning string methods in Python. Each of these methods evaluates a string against a specific condition and returns either True or False, making them essential for validation logic. For example, str.startswith() checks if a string begins with a given prefix, while str.islower() verifies that all cased characters are lowercase, and str.isalpha() confirms the string contains only alphabetic letters. On the Certified Associate Python Programmer PCAP exam, questions often test your ability to distinguish boolean-returning methods from those that return new strings or indices, a common trap being confusion with methods like str.lower() or str.find(). To remember, think of methods that ask a yes-or-no question about the string’s content—if it starts with, is all lowercase, or is all alphabetic—they all return a boolean. A handy mnemonic is “SIL” for startswith, islower, isalpha, each silently answering with True or False.
⚠ Common exam trap
Python Institute often tests the distinction between methods that return a boolean versus those that return a new string or an integer, leading candidates to mistakenly select str.upper() or str.find() because they think any method that checks a condition returns a boolean.
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
✓
str.startswith()
B is correct because str.startswith() returns True if the string starts with the specified prefix, otherwise False. It is a boolean-returning method, as required by the question.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
str.upper()
Why it's wrong here
Returns a string.
- ✓
str.startswith()
Why this is correct
Returns True or False.
- ✓
str.islower()
Why this is correct
Returns True or False.
- ✓
str.isalpha()
Why this is correct
Returns True or False.
- ✗
str.find()
Why it's wrong here
Returns integer index or -1.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
4 more ways this is tested on PCAP
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. Which THREE of the following string methods return a boolean value (True or False)? (Choose exactly 3 correct answers.)
medium- ✓ A.isspace()
- ✓ B.isalpha()
- ✓ C.isdigit()
- D.replace()
- E.find()
Why A: The `isspace()` method returns `True` if all characters in the string are whitespace characters (e.g., space, tab, newline) and the string is non-empty; otherwise, it returns `False`. This is a boolean-returning method that checks a specific character property, making option A correct.
Variation 2. Which TWO of the following string methods return a boolean value (True or False)?
medium- A.str.upper()
- B.str.split()
- ✓ C.str.startswith()
- ✓ D.str.isdigit()
- E.str.find()
Why C: Both `str.startswith()` and `str.isdigit()` return a boolean value (`True` or `False`) because they are designed for conditional checks. `str.startswith()` checks if the string starts with a given prefix, while `str.isdigit()` checks if all characters in the string are digits. In contrast, `str.upper()` returns a new string, `str.split()` returns a list, and `str.find()` returns an integer index. Therefore, options C and D are the correct answers.
Variation 3. Which TWO of the following string methods return a boolean value?
easy- ✓ A.startswith()
- B.capitalize()
- C.format()
- D.swapcase()
- ✓ E.isalpha()
Why A: The `startswith()` method returns `True` if the string starts with the specified prefix, otherwise `False`. Similarly, `isalpha()` returns `True` if all characters in the string are alphabetic and there is at least one character, otherwise `False`. Both methods explicitly return a boolean value (`True` or `False`), making them correct choices.
Variation 4. Which TWO of the following methods return a boolean value?
medium- A.str.upper()
- ✓ B.str.isspace()
- C.str.split()
- D.str.join()
- ✓ E.str.isalpha()
Why B: The methods `str.isspace()` and `str.isalpha()` are both string methods that return a boolean value (`True` or `False`) based on whether the string meets specific character classification criteria. `isspace()` returns `True` if all characters in the string are whitespace, while `isalpha()` returns `True` if all characters are alphabetic.
Last reviewed: Jun 30, 2026
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.