第 2 步:此函数需要在调用时返回新的权重。 (而且每次调用都需要 3 个值!)

  • 在函数中添加 return 语句以返回new_weight
  • 删除旧功能。用get_new_weight()的函数调用替换现有的函数调用!
  • 提示:调用get_new_weight()获取dino_moon_weightkitty_moon_weight ;然后再调用两次以获得dino_jupiter_weightkitty_jupiter_weight

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)