写出下列语句的输出结果:print(1 or 2, 0 or 2, False or True,True or False,False or 2,sep=' ')print(1 and 2, 0 and 2, False and 2,True and 2,False and True,sep=' ')
举一反三
- 下面语句输出结果是print((2 and True) and (True or 3>2 and False) or (True and False))
- 下面代码的输出结果是a = 2b = 2c = 2.0print(a == b, a is b, a is c) A: True False False B: True False True C: True True False D: False False True
- 语句print(2>3)输出结果为? A: False B: 0 C: 1 D: True
- 设a=3,b=5,c=-1,d=7,求下列逻辑表达式的值 1)(a-b)>c*d&&!(c>0)||d>b 2)a*d/(c*-a)>d%c||c>=d 3)(c+d)c 4)a-b>=c&&b-a>=d A: (1)True (2)True (3)True (4)False B: (1)False (2)True (3)True (4)False C: (1)True (2)False (3)True (4)False D: (1)True (2)True (3)False (4)False
- 下面代码的输出结果是 [br][/br] a= 2 [br][/br] b= 2 [br][/br] c= 2.0 [br][/br] print(a == b, a is b, a is c)(单选题) A: True False False B: True False True C: False False True D: True True False