Activity: Example
I'M FINISHED WITH HOUR OF CODE!
img

Here's an example of the holiday card you'll be creating today!

  • Press the space bar to make the snowflake fly around!
  • Click the Sprite to see a greeting!
  • Click Submit and Next to start building your own card.

stage.set_background("winter") sprite = codesters.Sprite("person12") sprite.go_to(-125, -50) #my_sprite.say("I can't wait for the holidays!") frosty = codesters.Sprite("snowman") frosty.go_to(100, -100) snow = codesters.Sprite("snowflake3") snow.go_to(100, 75) greeting = codesters.Text("Happy Holidays!") greeting.go_to(0, 200) greeting.set_color("yellow") def click(sprite): sprite.say("I hope your holidays are great!") sprite.move_up(100) sprite.turn_left(360) sprite.move_down(100) # add other actions... sprite.event_click(click) def space_bar(): snow.set_x_speed(5) snow.set_y_speed(2) stage.event_key("space", space_bar)
Support