๐Ÿ PyQuest๐Ÿฐ Game: Haunted Mansion ยท ๐Ÿ•ฏ๏ธ Step 2: Doors Inside Doors
โญ 0 XP๐Ÿ Python is waking upโ€ฆ

Step 2: Doors Inside Doors ๐Ÿ•ฏ๏ธ

Right now your story has one choice and then it's over. Real adventures keep going: every choice leads to another choice. ๐ŸŒณ

You do that by putting an if inside another if:

if choice == "north":
    print("๐Ÿบ A wolf blocks your path!")
    move = input("Do you RUN or ROAR? ").lower().strip()
    if move == "roar":
        print("๐Ÿ˜ฒ The wolf runs away!")
    else:
        print("๐Ÿƒ You escape, but drop your map.")

Look at the indentation โ€” that's what makes it work. The second question is indented, so it only happens if they went north. Python reads spaces the way you read paragraph breaks. ๐Ÿ“

This is called nesting, and it's how one program can hold a hundred different stories.

Your mission

Keep your Step 1 story, then:

  1. Add a second choice inside the left door (indented!)
  2. Add a second choice inside the right door
  3. Make at least one path end spookily โ€” a ghost, a trapdoor, a basement you never leave... ๐Ÿ‘ป

Two questions in a row, remember: that's two input() calls.

Your code

Press โ–ถ Run to see what your code does!