Skip to content · ⁨Saltar al contenido⁩

Star triangle · ⁨Triángulo de estrellas⁩

English

Star triangle

Print a triangle of stars four rows high: one star, then two, then three, then four.

Multiplying a string repeats it: "ab" * 3 is "ababab". Let the loop variable say how many stars each row needs.

Español

Triángulo de estrellas

Imprime un triángulo de estrellas de cuatro filas de altura: una estrella, luego dos, luego tres, luego cuatro.

Multiplicar una cadena la repite: "ab" * 3 es "ababab". Haz que la variable del bucle indique cuántas estrellas necesita cada fila.

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

IGCSE, A-Level & AP