Study

Logic operators

  •   0%
  •  0     0     0

  • Which logical operator is used to reverse the boolean value of an expression?
    not
  • What will be the output of this code? z = 20; print(not z < 10)
    True
  • If a = True and b = False, what is the result of a or b?
    True
  • What will the output of the following code be? x = 5; y = 10; print(x > 5 and y < 15)
    True
  • If x = 10 and y = 10, what will be the result of x == 10 and y != 5?
    True