ACTIVITY 34 / 50
Try as many times as you needA command with a parameter
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")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
- Read the last line of the error message.
- Find the indicated line. Check quotes, parentheses and indentation.
- Change one thing and run again.
main.py
4 spaces
Your draft stays in this browser.
Result
PythonYour program’s output will appear here. Click Run.
Мой профиль