Exam PCAP All QuestionsBrowse all questions from this exam
Question 91

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

    Correct Answer: A, D

    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.

Discussion
stuartzOptions: AD

>>> 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

macxszOptions: AD

A and D are True

TheNetworkStudentOptions: AD

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

TheNetworkStudent

minus the + in the third line after AB...

Noarmy315Options: AD

it seems AD

9prayerOptions: AD

A and D are True

DTL001

It's illisible