演示 2:在这项活动中,我们将看到如何使用在程序中创建的变量。

.Display() 中,我们使用变量名称 dice_roll 来显示它的值 5

  • 将鼠标悬停在显示器上控制台底部的位置,以查看其作用和名称。
  • 在编辑器中,将 dice_roll 的值更改为 16 之间的新数字。点击 运行 以查看更改。
  • 点击 检测 并回答问题。

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)