Which of the following expressions evaluate to True? (Choose two.)
Which of the following expressions evaluate to True? (Choose two.)
Expressions 'xYz'.lower() > 'XY' and 121 + 1 == int('1' + 2 * '2') evaluate to True. The first expression compares the lowercase 'xyz' with 'XY', and since 'xyz' comes after 'XY' in lexicographical order, it is True. The second expression checks if 122 is equal to the integer formed by '1' concatenated with '22', which results in 122, making it True.
answer should be B, D print('8' + '8' !=2*'8') # ans A, False print('xYz'.lower() > 'XY') # ans B, True print(float('3.14')==str('3.''14')) # ans C, False print(121+1 == int('1'+2*'2')) # ans D, True
should be B & D
The correct answer is BD
B and D
print('xYz'.lower() > 'XY') => True print(121 + 1 ==int('1' + 2 * '2')) => True
print('xYz'.lower() > 'XY') True B & D
print('8' + '8') -> 88 print(2 * '8') -> 88 so A is False
correct answers
right ones
BD - A would be true if we had ==