Python Level 5: The Game

Chapter 5: Building Your Own Game
Name:

Date:
Part 1: Talking Back (Input)

The computer wants to know your name! Fill in the missing code to ask the question.

What is your Hero Name?
hero_name = input("")
Part 2: The Loop of Life

Draw a line matching the Condition to what happens in the game.

while hearts > 0:
Keep Playing
hearts = 0
Game Over
Part 3: Fix the Battle

This battle code has 3 Syntax Errors (missing colons or bad indentation). Circle the mistakes!

while hearts > 0
  print("A wild Creeper appears!")
  action = input("Run or Fight?")

  if action == "Run":
print("You ran away safely.") ← (Hint: Check indentation!)
Part 4: Design Your Game

Plan your text adventure before you code it!

Game Title:
The Enemy:
(e.g., Zombie, Dragon, Evil Robot)
Starting Health: Hearts
Win Reward:
(e.g., 100 Gold, Diamond Sword)