Certified Associate in Python Programming (PCAP) — Question 42

Which of the following expressions evaluate to True? (Choose two.)

Answer options

Correct answer: B, C

Explanation

The correct answers are B and C. Option B is true because the character following 'A' in the ASCII table is indeed 'B'. Option C is also true since the string containing a single backslash has a length of 1. Options A and D are false, as the calculations in A do not yield the ASCII value of '0', and D checks the length of a string that contains characters, not an empty string.