Home › Course contents › Level 9: Keep Going
Several commands
Level 9: Keep Going
Chapter 1 · Starter Village
One tackle deals 10, so 30 HP takes 3 tackles. Just write 3 lines:
attack()
attack()
attack()
Remember, code runs one line at a time, from top to bottom.
GoalDefeat the Lilywhisp (30 HP).
TipYou can copy and paste the first line.
Starting code
# The Lilywhisp has 30 HP; one tackle deals 10
# Write enough lines of attack() to defeat it