Skip to content

Use what it gives back · ⁨使用它返回的值⁩

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 把一个值交回给调用它的地方。这个值不会被打印 —— 你要用 = 接住它,就像接住任何其他结果一样。

Log in or create account · ⁨登录或创建账户⁩

IGCSE, A-Level · ⁨IGCSE、A-Level⁩ & AP · ⁨与 AP⁩