第 13 步:就像其他值一样,返回值需要存储在变量中!

当我们使用return 语句时,我们总是将函数调用的结果存储在return 变量中。

  • 找到pig_latin( "hello" )代码中的函数调用行。
  • 在函数调用之前添加first_word =以便该行显示first_word = pig_latin( "hello" )
  • 返回变量first_word存储的是从pig_latin()函数返回"ellohay"

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)