#X005. 比较运算和逻辑运算

比较运算和逻辑运算

  1. 下列哪个比较运算符表示“不等于”?
    {{ select(1) }}
  • =
  • ==
  • !=
  • >=
  1. 编程中计算 5 > 3 的结果,返回的是什么类型的值?
    {{ select(2) }}
  • 整数
  • 布尔值
  • 字符串
  • 浮点数
  1. 表达式 10 <= 10 的运算结果是?
    {{ select(3) }}
  • True
  • False
  • 10
  • 0
  1. 逻辑运算符 and 表示“与”运算,下列哪个表达式结果为 True
    {{ select(4) }}
  • True and False
  • False and False
  • True and True
  • 5 > 10 and 3 < 8
  1. 表达式 7 != 7 的结果是?
    {{ select(5) }}
  • True
  • False
  • 7
  • 无法计算
  1. 逻辑运算符 or 表示“或”运算,False or True 的结果是?
    {{ select(6) }}
  • True
  • False
  • 0
  • 1
  1. 下列表达式中,结果为 True 的是?
    {{ select(7) }}
  • 3 + 2 == 6
  • 15 % 5 > 2
  • 8 % 3 == 2
  • 4 **2 < 10
  1. not 是逻辑非运算符,not (5 < 3) 的结果是?
    {{ select(8) }}
  • True
  • False
  • 5
  • 3
  1. 表达式 (2 > 1) and (4 < 5) 的结果是?
    {{ select(9) }}
  • True
  • False
  • 2
  • 4
  1. 下列哪个表达式可以判断 x 是大于 5 且小于 10 的数?
    {{ select(10) }}
  • x > 5 or x < 10
  • x > 5 and x < 10
  • x > 5 not x < 10
  • x > 5 == x < 10
  1. 6 >= 6 的运算结果是?
    {{ select(11) }}
  • True
  • False
  • 6
  • 以上都不对
  1. 逻辑运算 True or False or False 的结果是?
    {{ select(12) }}
  • True
  • False
  • 1
  • 0
  1. 表达式 (10 / 2) == 5 的结果是?
    {{ select(13) }}
  • True
  • False
  • 5
  • 10
  1. 下列哪个表达式结果为 False
    {{ select(14) }}
  • not True
  • 3 != 4
  • 7 >= 3
  • (2 + 3) == 5
  1. and 运算中,只要有一个条件为 False,结果就为 False,那么 (5 > 3) and (2 > 7) 的结果是?
    {{ select(15) }}
  • True
  • False
  • 5
  • 2
  1. 比较 3.5 == 3.5 的结果是?
    {{ select(16) }}
  • True
  • False
  • 3.5
  • 字符串 "True"
  1. 逻辑表达式 not (False or True) 的结果是?
    {{ select(17) }}
  • True
  • False
  • 无法确定
  • 0
  1. 下列哪个表达式可以判断 a 等于 b 或者 a 等于 c
    {{ select(18) }}
  • a == b and a == c
  • a == b or a == c
  • a = b or a = c
  • a == b not a == c
  1. 12 < 10 的运算结果是?
    {{ select(19) }}
  • True
  • False
  • 12
  • 10
  1. 表达式 (not False) and (6 % 3 == 0) 的结果是?
    {{ select(20) }}
  • True
  • False
  • 6
  • 3