第 6 步:让我们尝试更改精灵变量名

每个精灵和每个形状都有一个变量。形状的名称是等号 =之前的橙色单词。这个名称是我们用来调用形状的标签。在这个例子中,圆形被命名为sprite

  • 将名称更改为sun
  • 该名称不应有引号,并且应显示为橙色,如下this

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

# sprite = codesters.Circle(x, y, diameter, "color") sprite = codesters.Circle(-150, 175, 75, "gold")
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)