Code Monsters Academy
Home › Course contents › Level 5 - True or False
Comparisons and True / False

Level 5 - True or False

Chapter 2 · Monster League

A comparison only has two possible results: True and False:

print(5 > 3)      # True
print(2 == 7)     # False   two equals signs == mean "check if equal"

> greater than, < less than, >= greater than or equal, == equal, != not equal.

GoalSay the results of 10 == 10 and 3 > 7, in that order.
TipOne equals sign stores something; two equals signs compare.
Starting code
# Say the result of 10 == 10

# Say the result of 3 > 7
Practise this in the game
← Previous levelLevel 4 - Roll CallNext level →Level 6 - Keep Going Until…