# basics variables

Combining Conditions: and / or / not

Logical operators combine True/False values:

  • andTrue only if both sides are True
  • orTrue if at least one side is True
  • not — flips True to False and back
print(5 > 2 and 5 < 10)
print(5 > 2 and 5 > 10)

prints:

True
False

Your turn: read three numbers, a, b, c. Print the result of a > b and b > c.

💡 need a hint?

pyb-var-logical.py🔒 given lines are locked — write your code in between
loading...