第5步:我们需要一个可以在游戏中出现的动物列表。

  • 点击 ,将 List of Strings 拖动到程序内 def·interval(): 上方的任何位置。
  • my_list 重命名为 animals
  • 在 [ ] 内,你只需要2种动物:["fish1",·"shark"] 。确保逗号在引号外!

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)