Use what it gives back
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 →
Use what it gives back
double is written for you and returns a number. Call it with 21 and store the answer in answer.
return hands a value back to whoever called the function. That value is not printed — you catch it with =, exactly like any other result.
double is written for you and returns a number. Call it with 21 and store the answer in answer.
Click Run to see the output here.