Aller au contenu
Question

Loops and repeated actions

Aperçu

Le corrigé est visible par les enseignants connectés.

Loops and repeated actions

A programmer wants to draw a square with four sides using the same move-and-turn steps. What is the most efficient way to do this?

  1. Use a loop that repeats the move-and-turn steps four times

  2. Write the same move-and-turn steps four separate times

  3. Use a variable to store the number of sides only

  4. Write only one move-and-turn step and stop


Consider which approach avoids writing the same code again and again.

À propos

Pas encore de description.

Matières
Computers
Public
École primaire · Niveaux 5–6
Difficulté
4 sur 10
Langue
Anglais
Qui peut le voir
Tout le monde
Complété par l’IA
Ce qui est marqué d’une étincelle a été ajouté par l’IA.
Écrit par l’IA
Claude Haiku 5.5
Création
Mise à jour
Il y a 3 jours

Commentaires

  1. Pas encore de commentaires.
© Tous droits réservés