PCAP Exam QuestionsBrowse all questions from this exam

PCAP Exam - Question 115


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

Show Answer
Correct Answer: BD

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.

Discussion

10 comments
Sign in to comment
ivanbicalhoOptions: BD
Mar 1, 2023

should be B & D

dicksonpwcOptions: BD
Mar 10, 2023

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

macxszOptions: BD
Apr 30, 2022

B and D

Dr_Alzuhairy21Options: BD
May 20, 2022

The correct answer is BD

MTLEOptions: BD
Apr 25, 2022

BD - A would be true if we had ==

Dav023Options: BD
Sep 29, 2022

right ones

halyOptions: BD
Oct 8, 2022

correct answers

NengggOptions: BD
Dec 11, 2022

print('8' + '8') -> 88 print(2 * '8') -> 88 so A is False

MallieOptions: BD
Dec 20, 2022

print('xYz'.lower() > 'XY') True B & D

ferminsOptions: BD
Feb 2, 2024

print('xYz'.lower() > 'XY') => True print(121 + 1 ==int('1' + 2 * '2')) => True