Skip to content · ⁨Passer au contenu⁩

Add up one to five · ⁨Additionner de un à cinq⁩

English

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.

Français

Additionner de un à cinq

Utilisez une boucle for pour additionner 1 + 2 + 3 + 4 + 5 dans total.

range(1, 6) donne 1 jusqu'à 5 : il commence au premier nombre et s'arrête avant le second. Ajoutez chacun à un total qui commence à 0.

Log in or create account · ⁨Se connecter ou créer un compte⁩

IGCSE, A-Level & AP