0%
⭐ 0 XPMap
Chapter 1 · Quest 4 of 5 · 10 XP

Echo Echo

🔁 input() lets your bot ask a question and wait. Whatever the player types comes back as text.

pet = input("Favourite pet? ")
print(pet.upper())
print(pet + "!")
Favourite pet? cat
CAT
cat!

.upper() makes text shout. + glues two pieces of text together. When you click Run, a box pops up so you can type. When you Submit, the checker types hey for you.

Instructions

  1. Ask with input("Say something: ") and store the answer in word.
  2. Print word in capitals with .upper().
  3. Print word twice with one space between, like hey hey.
💡 Hint

word.upper() gives capitals. word + " " + word glues it twice with a space in the middle.

Ask the community

bot.py
Terminal
← BackNext →

Chapter 1: Hello, Bot

The full quest map

Talk it out

  1. Read the instruction with the ✗ out loud.
  2. Say what your code does, line by line, as if to a friend.
  3. Find the line where what it does and what you want split apart.
  4. Press Run and read the terminal. Is that what you expected?
  5. Still stuck? Press Ask Pip why, or peek at the solution.
  6. Or ask on the community help board: say which quest, and paste your code.
New badge!

Your bot just got a new part. See it on the quest map.

Name your bot

It levels up as you play, and gets a new part with every chapter.