第 3 步:我们将在形状中使用函数参数变量,以便在调用函数时自定义它们!

  • 将圆的变量名称从sprite更改为head ,并将圆的直径从100更改为50
  • head的 x 坐标从0更改为x
  • head的 y 坐标从0更改为y + 50 。这会将圆圈放置在y上方 50 像素处!
  • head的颜色参数从"blue"更改为变量color

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)