Activity: Preview
img

PREVIEW: This an an example of the program you'll be building today!

Notice that all the numbers are blue and the text is green. Today, we'll be learning about different data types.

  • Click Run to see the example.
  • Press Enter on your keyboard to see the sprite flip.
  • Click Submit and Next .

stage.set_background("concert") sprite = codesters.Sprite("person1") sprite.set_speed(3) sprite.move_down(100) sprite.flip_up_down() sprite.move_left(200) sprite.move_right(150) stage.wait(1) sprite.flip_up_down() sprite.wait(2) sprite.turn_right(360) sprite.wait(2) sprite.flip_right_left() stage.wait(.3) sprite.flip_right_left() stage.wait(.3) sprite.flip_right_left() stage.wait(.3) sprite.move_back(100) sprite.flip_up_down() sprite.move_forward(100) sprite.flip_up_down() sprite.move_up(50) stage.wait(.1) sprite.move_down(50) stage.wait(.3) sprite.move_up(50) stage.wait(.1) sprite.move_down(50) stage.wait(.3) sprite.move_up(50) stage.wait(.1) sprite.move_down(50) sprite.wait(2) sprite.turn_right(360) sprite.wait(2) def enter_key(): sprite.turn_right(360) # add other actions... stage.event_key("enter", enter_key)
Support