Star triangle · Triangle d'étoiles
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.
Triangle d'étoiles
Affichez un triangle d'étoiles haut de quatre lignes : une étoile, puis deux, puis trois, puis quatre.
Multiplier une chaîne la répète : "ab" * 3 est "ababab". Laissez la variable de boucle dire combien d'étoiles chaque rangée nécessite.
Print a triangle of stars with 4 rows: *, **, ***, ****. Use a loop and "*" * n. · Imprimez un triangle d'étoiles avec 4 lignes : *, **, ***, ****. Utilisez une boucle et "*" * n.
Click Run to see the output here. · Cliquez sur Exécuter pour voir le résultat ici.