Skip to content · ⁨Saltar al contenido⁩

Count to ten · ⁨Contar hasta diez⁩

English

Count to ten

Print the whole numbers from 1 to 10, each on its own line.

A for loop repeats its indented lines once for every value it is given. range(1, 4) gives 1, 2, 3: it stops before its second number, so choose that number with care.

Español

Contar hasta diez

Imprime los números enteros del 1 al 10, cada uno en su propia línea.

Un bucle for repite sus líneas indentadas una vez por cada valor que recibe. range(1, 4) genera 1, 2, 3: se detiene antes de su segundo número, así que elige ese número con cuidado.

Log in or create account · ⁨Iniciar sesión o crear cuenta⁩

IGCSE, A-Level & AP