VERIFIQUE LA COMPRENSIÓN: ¡Aquí hay algunas preguntas para que verifique lo que ha aprendido!

  • Hacer clic Ejecute e ingrese números cuando se le solicite.
  • Usa el código en el editor para responder las preguntas de opción múltiple.
  • Hacer clic Enviar y Siguiente para seguir adelante.

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

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()
  • Run Code
  • Enviar Trabajo
  • Actividad Siguiente
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)