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
- Ask with
input("Say something: ")and store the answer inword. - Print
wordin capitals with.upper(). - Print
wordtwice with one space between, likehey hey.
💡 Hint
word.upper() gives capitals. word + " " + word glues it twice with a space in the middle.
bot.py
Terminal