Copying the same instructions into several places makes mistakes harder to fix. A function gives that work one home and a meaningful name.
print("Welcome")Line-by-line explanation
printis a function Python already provides.- The function name describes its job.
- Round brackets contain the information given to it.
Tiny Practice
Call the built-in print function with a message.
Starter template
CHANGE_ME("Hello")Line-by-line explanation
- The brackets and message are ready.
- Only the function name is missing.
Hint
- Use a built-in function from earlier lessons.
- Its name begins with p.
- Do not quote the function name.
Show Solution
print("Hello")Line-by-line explanation
printnames the function.- The brackets call it.
- Hello is displayed.