Ask for a name · Pedir un nombre
Ask for a name
input() reads one line that the user types. Store it in a box, then use it.
When you press Run, the program waits: a highlighted box appears under the code. Type a name there and press Enter. Check answer types Sam for you.
Pedir un nombre
input() lee una línea que el usuario escribe. Guárdala en una caja y luego utilízala.
Cuando presionas Ejecutar, el programa espera: aparece una caja resaltada debajo del código. Escribe un nombre ahí y presiona Enter. Comprobar respuesta escribe Sam por ti.
Read a name with input(). Then show Hi, + the name + !. For Sam, show Hi, Sam!. · Leer un nombre con input(). Luego mostrar Hi, + el nombre + !. Para Sam, mostrar Hi, Sam!.
Click Run to see the output here. · Haz clic en Ejecutar para ver la salida aquí.