Finish the function · 把函数补完
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
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.
中文
把函数补完
def 那一行已经写好了。在它里面补上返回 a + b 的那一行。
a 和 b 代表调用者传进来的任何值。在函数里面把它们当普通变量用就行 —— 函数体就是普通代码,缩进在 def 下面。
The def line is written. Add the one line inside it that gives back a + b. · def 那一行已经写好了。在它里面补上返回 a + b 的那一行。
Click Run to see the output here. · 点击“运行”查看此处输出。