第 13 步:让我们这样做,以便用户输入可用于使精灵移动!

  • 单击逻辑选项卡,然后并将Convert to Integer拖到程序底部。
  • 将 = 符号左侧的变量名称从my_varjump_integer.
  • int()括号中的变量从my_varjump

jump_integer将用户的输入存储为整数!我们现在可以将此变量用作整数参数。

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)