第 11 步:我们找到了数字的总和和值的数量,所以我们可以使用我们的程序来求平均值!

请记住,我们通过将所有值的总和除以集合中值的数量来找到均值

  • 在 LOGIC 中,转到并将Integer Variable拖到代码底部。
  • my_mean my_var
  • 将等号右侧的25更改为: total / num_values

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)