Let's make a new piece of the user's 'info' fall from the top of the stage every few seconds.

  • Go to and drag out Interval Event.

The last line of the event is the event handler. The number in the event handler controls how often the interval runs.

  • Change the event handler to run the event every 3 seconds.

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

stage.set_background("schoolhallway") sprite = codesters.Sprite("person8") stage.set_gravity(4) stage.disable_floor() sprite.set_gravity_off() sprite.go_to(0, -220) score = 0 score_board = codesters.Display(score) my_info = ["cellphone", "address", "birthdate"] def left_key(): sprite.move_left(20) # add other actions... stage.event_key("left", left_key) def right_key(): sprite.move_right(20) # add other actions... stage.event_key("right", right_key)
  • Run Code
  • Enviar Trabajo
  • Actividad Siguiente
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)