• Añade otra para tu figura. Este es buen tiempo para moverla fuera del escenario si lo deseas.
  • Utiliza Ask para hacer una pregunta al usuario. Nombra la variable que almacena la respuesta transition4.
  • Utiliza Set Text para mostrar la palabra de transición entrada por el usuario en el escenario como parte de tu historia.

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

stage.set_background("park") sprite = codesters.Sprite("person3") sprite.glide_to(-100, 50) # text = codesters.Text("text", x, y, "color") text = codesters.Text("I went to the park!", 0, -200, "blue") stage.wait(1) sprite.move_right(400) transition1 = sprite.ask("Choose a transition from the sequence category.") text.set_text(transition1) sprite.move_left(200) stage.set_background("underwater") text.set_text("I like turtles.") stage.wait(2) transition2 = sprite.ask("Enter another word") text.set_text(transition2) stage.set_background("jupiter") text.set_text("Then I was in space!") stage.wait(2) transition3 = sprite.ask("Enter yet another word") text.set_text(transition3) stage.set_background("city") text.set_text("Then I went to a city") stage.wait(2)
  • Run Code
  • Enviar Trabajo
  • Actividad Siguiente
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)