Skip to content · ⁨コンテンツへスキップ⁩

Your first function · ⁨最初の関数⁩

English

Your first function

Up to now you printed things. A function is a small machine: you give it an input and it returns an answer. You write the inside; the checker tries it with several inputs.

return hands the answer back. Complete double so it returns n times two.

日本語

最初の関数

これまで、出力を行うことをしました。関数とは小さな機械のようなもので、入力を与えると**返答(値)**を返します。内部のコードを書くだけですが、チェックツールがいくつかの入力で試して確認します。

return は答えを返します。double を完成させて、n の2倍を返すようにしてください。

Log in or create account · ⁨ログインまたはアカウント作成⁩

IGCSE, A-Level & AP