Certified Associate in Python Programming (PCAP-31-03) — Question 5

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

Answer options

Correct answer: A, D

Explanation

Option A is correct because the lowercase version of 'xYz' is 'xyz', which is indeed greater than 'XY'. Option D is also correct as the expression evaluates to 122, which matches the result of int('1' + '22'). The other options do not evaluate to True: B compares a string concatenation with an integer multiplication incorrectly, and C compares a float with a string, which will not result in equality.