Skip to main content
🐍 Python Basics 🐍

Return a Word ✏️

Time to write your very first Python! This is the smallest possible task: you'll just type a word.

Below is a function called shout. Right now it has pass, which means "do nothing." Your job: replace it with a return that hands back any word you like in quotes.

def shout():
    return "PIZZA"   # hands back the word PIZZA

Your task

Make shout hand back any word that isn't empty. Go wild β€” your name, your favorite food, anything! πŸ•

⚑ 15 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…
Tests1 to pass
shout() hands back a word

Run your code to check these.