Call a function
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version.
This one builds on a lesson you haven't finished yet. Do that lesson first:
Python Basics · Functions →
Call a function
greet is already written for you. Call it with "Mia" so the program prints "Hello, Mia".
Writing def only describes the function — nothing happens until you call it by name with brackets: greet("Mia"). The call goes at the left margin, outside the def.
Difficulty 1/5 · 100 coins + a small bonus on first completion today
greet is already written for you. Call it with "Mia" so the program prints "Hello, Mia".
Click Run to see the output here.