The dragon explains
Asking questions about numbers
The dragon: Before the dragon can DECIDE anything, it needs to ASK a question. That's what comparisons do.
The dragon: Comparing two things gives you an answer of True or False. Nothing else — just those two words.
example.pyPython 3print(80 > 50)OutputTrueThe dragon: Flip the numbers and you might flip the answer.
example.pyPython 3print(30 > 50)OutputFalseThe dragon: Careful with 'at least' or 'at most' — the boundary matters. > leaves the exact number OUT.
example.pyPython 3strength = 50print(strength > 50)
OutputFalseThe dragon: >= means 'greater than OR equal to'. That includes the boundary.
example.pyPython 3strength = 50print(strength >= 50)
OutputTrueThe dragon: And checking if two things are EQUAL uses two equals signs, not one — one = is for filling a box.
example.pyPython 3gold = 100print(gold == 100)
OutputTrue
Quick check
Check your understanding
Say your answer out loud before reading the marked one. Every wrong option is a mistake real beginners make.
Question 1 of 2
health is exactly 20. What does print(health > 20) say?
question.pyPython 3health = 20print(health > 20)
- FalseCorrect
- True
- 20
Why: 20 is not bigger than 20, so print(health > 20) says False. > is strict — the boundary itself does not count. That's what >= is for.
Question 2 of 2
gold = 5. What does print(gold = 5) do — with ONE equals sign, inside print?
question.pyPython 3gold = 5print(gold = 5)
- That's actually an error — = isn't a questionCorrect
- True
- 5
Why: A single = always means assignment, never a question — Python won't let you use it to compare. That's exactly why == exists: two equals signs specifically for asking 'are these the same?'
In the game
What you'll practice
Four levels in the game: one guided first try with the shape of the answer already there, then three to solve on your own.
- 1
GuidedYour first try
The dragon's strength is 80. Ask Python: is that MORE than 50? print() the answer — Python already knows how to say True or False.
- +3
PracticeThree more, on your own
This lesson is part of PRO.
PRO is a one-time $49.99 purchase, no subscription, and unlocks this whole topic along with everything else. Topics 1–3 are free, start to finish.
Unlock this lesson with PROStuck three times? The game offers the answer — unasked.