Run it! · ¡Ejecútalo!
Start here
- A lesson is a list of short steps. Press Continue (the arrow at the bottom) for the next one.
- After the steps come tasks: code you change and run.
- Today you type very little. You change one small thing at a time.
Comenzar aquí
- Una lección es una lista de pasos cortos. Presiona Continuar (la flecha en la parte inferior) para ir al siguiente.
- Después de los pasos vienen las tareas: código que modificas y ejecutas.
- Hoy escribirás muy poco. Cambiarás una pequeña cosa a la vez.
The buttons
- Run ▶ runs the code. What it prints appears in the dark box under it.
- Check answer tests your code. Green means correct, and you win coins.
- The lightbulb gives a hint when you are stuck.
- Reset brings the starting code back.
Los botones
- Ejecutar ▶ ejecuta el código. Lo que imprime aparece en el cuadro oscuro debajo.
- Verificar respuesta comprueba tu código. Verde significa correcto, y ganas monedas.
- La bombilla da una pista cuando estás atascado.
- Restablecer vuelve al código inicial.
print("I am an example. Press the play button to run me.")
When something goes wrong
- If the code has a mistake, Python stops and shows red text.
- Under the red text, a card explains the error in English and Chinese and tells you which line to look at.
- Mistakes are normal. Read the card, fix one thing, and run again.
Cuando algo sale mal
- Si el código tiene un error, Python se detiene y muestra texto rojo.
- Debajo del texto rojo, una tarjeta explica el error en inglés y chino y te dice qué línea revisar.
- Los errores son normales. Lee la tarjeta, corrige una cosa y ejecuta de nuevo.
When a program waits for you
- Some programs ask a question with
input(). - Then a highlighted box appears: type here, then press Enter.
- Click the box, type your answer and press Enter. The program continues.
Cuando un programa espera por ti
- Algunos programas hacen una pregunta con
input(). - Aparece entonces un cuadro resaltado: escribe aquí, luego presiona Enter.
- Haz clic en el cuadro, escribe tu respuesta y presiona Enter. El programa continúa.
name = input("What is your name? ")
print("Nice to meet you, " + name)
Now you try
- Three small tasks. Change the code, press Run, then Check answer.
Ahora tú intentas
- Tres tareas pequeñas. Cambia el código, presiona Ejecutar, luego Verificar respuesta.
This program is switched off: the # at the start makes the line a comment, so Python skips it. Delete the #, press Run ▶ to see what it prints, then press Check answer. · Este programa está apagado: el # al principio convierte la línea en un comentario, por lo que Python lo ignora. Elimina el #, presiona Ejecutar ▶ para ver qué imprime y luego presiona Comprobar respuesta.
Click Run to see the output here. · Haz clic en Ejecutar para ver la salida aquí.
Change one word so the program prints I like dogs. Only the text inside the quotes changes. · Cambia una palabra para que el programa imprima I like dogs. Solo cambia el texto dentro de las comillas.
Click Run to see the output here. · Haz clic en Ejecutar para ver la salida aquí.
This program has a mistake. Press Run ▶ first and read the card under the red text: it explains the error. Then fix the line so the program prints Hello. · Este programa tiene un error. Presiona Ejecutar ▶ primero y lee la tarjeta debajo del texto rojo: explica el error. Luego corrige la línea para que el programa imprima Hello.
Click Run to see the output here. · Haz clic en Ejecutar para ver la salida aquí.