Activity: Preview

PREVIEW: Before we get started making our very first program, let's look at an example.

  • Click Run to see an example of the program you will create today.
  • This program has a background image and a sprite or character that moves and is clickable.
  • Watch the fox move, then click on the fox once it stops moving to see what it does.
  • Click Submit and Next to continue.

stage.set_background("winter") sprite = codesters.Sprite("fox") sprite.set_speed(2) sprite.move_down(150) stage.wait(1) sprite.move_right(50) sprite.say("Click on me!") def click(): sprite.say("Hey there Codester!") sprite.move_up(100) sprite.turn_right(360) sprite.move_down(100) sprite.say("Great job.") stage.wait(1) sprite.say("Click submit and next to continue!") sprite.event_click(click)