Skip to main content
🐍 Python Basics 🐍

SHOUT in Capitals πŸ”Š

Strings (text) come with handy methods β€” little tools you attach with a dot. One is .upper(), which makes every letter a CAPITAL:

"hi".upper()      # "HI"
"hello".upper()   # "HELLO"

You can also glue text together with +:

"HI" + "!"   # "HI!"

Your task

Write shout(text) that returns the text in CAPITALS with a "!" added at the end. shout("go") returns "GO!".

⚑ 30 XP

🧱 Code blocks

Drag a block into the editor, or tap it to drop it in where your cursor is. Add them in order to build your answer.

solution.pyRuns in your browser (Pyodide)
Loading editor…
Tests2 to pass
shout("go") == "GO!"
shout("hi") == "HI!"

Run your code to check these.