Exam PCAP-31-03 All QuestionsBrowse all questions from this exam
Question 13

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

    Correct Answer: A, D

    The expression 'xYz'.lower() > 'XY' evaluates to True because 'xyz' is lexicographically greater than 'XY'. The expression 121 + 1 == int('1' + 2 * '2') evaluates to True because 122 is equal to the integer formed by concatenating '1' and '22', resulting in 122. The other options do not evaluate to True. For example, '8'+'8' == 2 * '8' evaluates to '88' == '88', which is True, not False, and float('3.14') == str('3.' + '14') evaluates to 3.14 == '3.14', which is False, as one is a float and the other is a string.

Discussion
Dave304409Options: AD

A, D is correct

a4129fdOptions: AD

AD are the right ones, as validated in my IDE

DKAT2023Options: AD

A and D are corrects

kstrOptions: AD

AD: print( 'xYz'.lower() > 'XY' ) print('8'+'8' != 2 * '8' ) print( float ('3.14') == str('3.' + '14') ) print( 121 + 1 == int('1' + 2 * '2') )