单选题 适中
#16380

已知x=3,y=7,则表达式 (x < y and not x == 3) or (y > 5 and x != 2) 的值为?( )

已知x=3,y=7,则表达式 (x < y and not x == 3) or (y > 5 and x != 2) 的值为?( )

未登录也能判分,登录后才会记录
答案与解析
正确答案:A
解析
x < y 为 True,x == 3 也为 True,所以 not x == 3 为 False,因此 (x < y and not x == 3) 为 False;y > 5 为 True,x != 2 也为 True,所以 (y > 5 and x != 2) 为 True。整个表达式为 False or True,最终结果为 True。