STEP 7: We can see our player on the stage now, but we need to return the sprite from add_player() in order to use the sprite in our main() function.

The return statement passes a variable from a function back to where the function is called.

  • Click on LOGIC. Go to and drag Return Statement to the last line of add_player().
  • Change the variable being returned from my_var to player. Make sure this return statement is indented!

def set_stage(): """ Sets up the stage for the game """ stage.set_background("soccerfield") stage.disable_floor() def add_player(): """ Adds a player to the stage for the user to control """ player = codesters.Sprite("player1") player.go_to(0, -155) def main(): """ Sets up the program and calls other functions """ set_stage() player = add_player() main()