If statement conditions
There are a number of tests which you do. These are known as conditions. The code below demostrates the main ones.
a = 34
b = 87
if a < b:
print a, "less than", b
if a > b:
print a, "greater than", b
if a == b:
print a, "equal", b
if a != b:
print a, "not equal", b
Before running the code have a think about what it will do.
- < - less than
- < - less than
- > – greater than
- == – equal to
- != – equal to
Change a to 50 and b to 50. See what is produced!
Output: (clear)











