Мой профиль
ACTIVITY 34 / 50

A command with a parameter

Try as many times as you need

Let’s understand

A parameter is a name in a function definition. An argument is a value supplied when calling it. In def greet(name), name is a parameter; in greet("Ada"), Ada is an argument. One function can work with different data.

Listen to the explanation

Example

def show(value):
    print(value)

show("Earth")
YOUR MISSION

Define announce(name) to print name. Call it with Moon, then Mars.

I need a hint

Inside print, use the parameter name without quotes.

How to find an error
  1. Read the last line of the error message.
  2. Find the indicated line. Check quotes, parentheses and indentation.
  3. Change one thing and run again.

main.py

4 spaces

Your draft stays in this browser.

Result

Python
Your program’s output will appear here. Click Run.