第6步:如果用户选择海滩,我们将背景更改为海滩!

任何在测试语句为真时运行的指令都必须在 if 区块中缩进。

  • .say() 中的字符串更改为 "I love going to the beach!"
  • 点击 ,并将 Summer 拖动到 if 语句内部。

  • 点击 运行 并将 beach 输入到询问框中,以检查你的程序。

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)