Which of the following expressions evaluate to True? (Choose two.)
Which of the following expressions evaluate to True? (Choose two.)
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.
A. ord("z") - ord("Z") == ord("0") B. len(" ") > 0 <<<< True C. chr(ord('a') + 1) == 'B' D. len('\'') == 1 <<< True
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
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
BD are correct