Which of the following expressions evaluate to True? (Choose two.)
Which of the following expressions evaluate to True? (Choose two.)
121 + 1 is evaluated as an integer sum resulting in 122, while '1' + 2 * '2' is evaluated as string concatenation resulting in '122', hence they are not equal and the expression evaluates to True. '3.14' as a string is not equal to the string representation of the float 3.1415, hence this expression also evaluates to True. Therefore, the correct answers are A and D.
>>> 121 + 1 != '1' + 2 * '2' True >>> '3.14' != str(3.1415) True >>> 'AbC'.lower() < 'AB' False >>> '1' + '1' + '1' < '1' *3' File "<stdin>", line 1 '1' + '1' + '1' < '1' *3' ^ SyntaxError: EOL while scanning string literal
A and D are True
I think I've deciphered it to the following: print(121 + 1 != '2' * 2 + '1') print(3 * '1' > '1' + '1' + '1') print('AbC'.lower() < 'AB+') print(3.14 != str(3.1415)) if that's true, it's A & D
minus the + in the third line after AB...
it seems AD
A and D are True
It's illisible