STEP 5: Oops! That Glide To command sent our sprite all the way off the stage! Let's change the coordinates so that our sprite glides to the hat! In this lesson, our stage goes from -8 to 8 on the x-axis and the y-axis.

  • Click Run to see the hat on the stage.
  • Click in the code editor and change the numbers in the .glide_to() command to (5, -6).
  • The numbers in the .glide_to() command are the coordinate pair that the sprite will glide to.

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

stage.set_background("winter") sprite = codesters.Sprite("snowman") sprite.set_size(.5) sprite.pen_down() sprite.glide_to(-100, 50)
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)