Certified Associate in Python Programming (PCAP) — Question 66
Which of the following expressions evaluate to True? (Choose two.)
Answer options
- A. 121 + 1 != '1' + 2 * '2'
- B. '1' + '1' + '1' < '1' *3'
- C. 'AbC'.lower() < 'AB'
- D. '3.14' != str(3.1415)
Correct answer: A, D
Explanation
Option A evaluates to True because the integer result of 121 + 1 is not equal to the result of concatenating the string '1' with the integer result of 2 * '2'. Option D is also True as the string '3.14' is indeed not equal to the string representation of the float 3.1415. Options B and C evaluate to False due to incorrect comparisons involving string concatenation and string case sensitivity.