WeCodeAcademy

Default Values and Keyword Arguments

Parameters can have default values, and callers can pass arguments by name.

Examplepython
Open in editor »
Quick check

What does `greet("Ada")` use for `greeting`?

Your turn: write the code

Write greet(name, greeting="Hello") that returns greeting, name!. Print greet("Ada").

Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.

Tip: use the left and right arrow keys to move between lessons.