The dragon explains
The Dragon Council
The dragon: You know comparisons, if, elif, and else. The council challenge just needs all four together.
The dragon: Remember: elif stops at the FIRST match, even when a later condition would also be true.
example.pyPython 3strength = 85if strength >= 80: print("Mighty")elif strength >= 40: print("Strong")
OutputMightyThe dragon: One dragon, one title. That rule matters even more now — you'll judge three dragons at once.
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 1
strength = 85, using if/elif/else with 80 and 40 as the cutoffs. How many titles print?
- One — MightyCorrect
- Two — Mighty and Strong
- Zero — 85 doesn't match any range exactly
Why: 85 >= 80 is True, so Mighty prints and the chain stops right there — elif never even checks the 40 condition. One dragon, one title, always.
In the game
What you'll practice
Three levels in the game: one guided first try with the shape of the answer already there, then two to solve on your own.
- 1
GuidedYour first try
Gold is 200. If gold is 100 or more, say 'The door opens.' Otherwise, say 'Locked.' Use a variable, a comparison, and if/else together.
- +2
PracticeTwo 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.