CHECK FOR UNDERSTANDING: Here are a few questions for you to check what you've learned!

  • Click Run and enter numbers when prompted.
  • Use the code in the editor to answer the multiple choice questions.
  • Click Submit and Next to move on.

def add_sprite(): """ Adds a player to the stage for the user to control """ person = codesters.Sprite("person3",0,-155) return person def add_numbers(a, b): """Add two numbers together and return the answer""" answer = a + b return answer def main(): """ Sets up the program and calls other functions """ person = add_sprite() num1 = int(person.ask("Enter a number")) num2 = int(person.ask("Enter a 2nd number")) sum = add_numbers(num1, num2) person.say("The sum is " + str(sum)) main()