Exam PCAP All QuestionsBrowse all questions from this exam
Question 124

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

    Correct Answer: B, D

    To determine which expressions evaluate to True, let's evaluate each option individually. For option A, ord(ג€zג€) - ord(ג€Zג€) == ord(ג€0ג€), this expression is syntactically incorrect and will not evaluate to True as stated. For option B, len(ג€ג€ג€ ג€ג€ג€) > 0, the length of the non-empty string is indeed greater than 0, so it evaluates to True. For option C, chr(ord('a') + 1) == 'B', this is incorrect because chr(ord('a') + 1) actually equals 'b', not 'B'. For option D, len(''') == 1, the length of a string containing a single quote is indeed 1, so this evaluates to True. Therefore, the correct answers are B and D.

Discussion
macxszOptions: BD

A. ord("z") - ord("Z") == ord("0") B. len(" ") > 0 <<<< True C. chr(ord('a') + 1) == 'B' D. len('\'') == 1 <<< True

seaverickOptions: BD

print(ord("z") - ord("Z") == ord("0"))#False print(len(""" """) > 0)#True print(chr(ord('a') + 1) == 'B')#False print(len('\'') == 1) #True Ans is B,D

dicksonpwcOptions: BD

B and D are correct print(ord("z") - ord("Z") == ord("0")) # ans A, False print(len(" ") > 0) # ans B, True print(chr(ord('a') + 1) == 'B') # ans C, False print(len('\'') == 1) # ans D, True

ryanzouOptions: BD

BD are correct