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. · 此页面需较新浏览器(支持 SharedArrayBuffer)。请升级 Chrome、Edge、Firefox 或 Safari 至最新版本。
This one builds on a lesson you haven't finished yet. Do that lesson first: · 此任务基于您尚未完成的课程。请先完成以下课程:
Python Basics · Python 基础 · Functions · 函数 →
English
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 已经写好了,它会返回一个数。用 21 调用它,把结果存进 answer。
return 把一个值交回给调用它的地方。这个值不会被打印 —— 你要用 = 接住它,就像接住任何其他结果一样。
double is written for you and returns · 返回值 a number. Call it with 21 and store the answer in answer. · double 已经写好了,它会返回一个数。用 21 调用它,把结果存进 answer。
Click Run to see the output here. · 点击“运行”查看此处输出。