The dragon explains
The Dragon's Final Check
The dragon: You know three things about how I follow your code now. Let's put them together.
The dragon: One: top to bottom, always — one line, one step.
example.pyPython 3move_right()move_right()
The dragon: Two: nothing happens unless you wrote it. Walking never grabs, and one line never repeats itself.
The dragon: Three: a change only counts for the lines after it. The key has to be in my claws BEFORE I reach the gate.
example.pyPython 3move_up()move_up()grab()move_down()move_down()move_right()move_right()move_right()
The dragon: That's everything. The challenge ahead just asks you to use all three 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
No key, four steps right. Where do I end up?
question.pyPython 3move_right()move_right()move_right()move_right()
- Right in front of the gateCorrect
- Next to the gold
- Just past the gate
Why: In front of the gate. Two steps get me there, and the last two just bonk — the key was never picked up.
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
A short warm-up before the big cave. Pick up the gem on the way, then finish on the gold — one line for every step and one for the grab. Nothing happens unless you write it.
- +2
PracticeTwo more, on your own
Try it yourself — in real Python.
This lesson is part of a free topic: every lesson in it is free, and no card is needed.
Start this lesson for realStuck three times? The game offers the answer — unasked.