Finish the 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 →
Finish the function
The def line is written. Add the one line inside it that gives back a + b.
a and b stand for whatever the caller passes in. Inside the function you use them as ordinary variables — the body is just normal code, indented under the def.
The def line is written. Add the one line inside it that gives back a + b.
Click Run to see the output here.