Here are all the actual test exam dumps for IT exams. Most people prepare for the actual exams with our test dumps to pass their exams. So it's critical to choose and actual test pdf to succeed.

Exam PCAP-31-03 Topic 4 Question 11 Discussion

Actual exam question for Python Institute's PCAP-31-03 exam
Question #: 11
Topic #: 4
Which of the following expressions evaluate to True? (Select two answers)

Suggested Answer: A,D Vote an answer

by vrsnv28 at Dec 29, 2025, 05:54 PM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
kvanman
2026-04-08 01:44:37
Correct: A, D

Analysis of Expressions

A. '1' + '2' * 2 != '12'
Step 1 (Multiplication): String multiplication '2' * 2 results in '22'.
Step 2 (Addition): Concatenating '1' + '22' results in '122'.
Step 3 (Comparison): '122' != '12' is True.

B. 3 * 'a' < 'a' * 2
Step 1: 3 * 'a' results in 'aaa'.
Step 2: 'a' * 2 results in 'aa'.
Step 3 (Lexicographical Comparison): Strings are compared character by character. 'aaa' is longer than 'aa' but identical in the first two characters. Since 'aaa' has more characters, it is considered "greater than" 'aa'. Therefore, 'aaa' < 'aa' is False.

C. 11 == '011'
In Python, an integer (11) is never equal to a string ('011'), even if the content looks similar. This comparison is False.

D. 'abc'.upper() < 'abc'
Step 1: 'abc'.upper() results in 'ABC'.
Step 2 (Comparison): In the ASCII/Unicode table, uppercase letters come before lowercase letters (e.g., 'A' is 65, 'a' is 97). Since 65 is less than 97, 'ABC' is indeed "less than" 'abc'. This is True.
upvoted 1 times
...
vrsnv28
2025-12-29 17:54:04
Only 'A' is correct
upvoted 1 times
kvanman
2026-04-08 01:44:50
D. 'abc'.upper() < 'abc'
Step 1: 'abc'.upper() results in 'ABC'.
Step 2 (Comparison): In the ASCII/Unicode table, uppercase letters come before lowercase letters (e.g., 'A' is 65, 'a' is 97). Since 65 is less than 97, 'ABC' is indeed "less than" 'abc'. This is True.
upvoted 1 times
...
...
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.