Add up one to five · Sumar de uno a cinco
Add up one to five
Use a for loop to add 1 + 2 + 3 + 4 + 5 into total.
range(1, 6) gives 1 to 5: it starts at the first number and stops before the second. Add each one onto a total that starts at 0.
Sumar uno a cinco
Utilice un bucle for para sumar 1 + 2 + 3 + 4 + 5 en la variable total.
range(1, 6) genera números del 1 al 5: comienza en el primer número y se detiene antes del segundo. Añada cada uno a un total que comience en 0.
Use a for loop to add 1 + 2 + 3 + 4 + 5 into total. · Usa un bucle for para sumar 1 + 2 + 3 + 4 + 5 en total.
Click Run to see the output here. · Haz clic en Ejecutar para ver la salida aquí.