警告:此程序有一个错误,需要进行修复!让我们学习一些函数的规则!

规则1:函数名称中不能有空格。将两个单词名称通过下划线_组合在一起,就像这样 function_name

  • 点击 运行 并阅读弹出的错误信息。
  • 通过使函数名称变成一个词来调试程序。

To navigate the page using the TAB key, first press ESC to exit the code editor.

sprite = codesters.Sprite("dinosaur", 0, -125) sprite.set_speed(2) def dino band(): stage.set_background("concert") sprite.say("My band is called Rock-asaurous Rex") sprite.turn_left(360) dino_band()
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)