第 1 步:让我们编写一个函数,通过使用更多参数来完成这两个函数的工作!

  • 在程序的顶部,使用参数image_label, earth_weight, gravity创建一个名为get_new_weight()的函数。
  • 使用带有参数image_label的函数内部缩进的Set Background
  • 在函数的下一行,通过乘以earth_weight * gravity来计算new_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)