我们可以使用变量来记录投篮时按下向左键和向下键的次数。

  • 使用 Integer Variable 创造一个名为 left_count 值为 0 的变量。
  • 使用另一个 Integer Variable 创造一个名为 down_count 值为 0 的变量。

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)