PatioLab
Home › Activity library › Main activities for Elementary › Movement Program: Loops, Conditions and Debugging

Movement Program: Loops, Conditions and Debugging

Each team writes a program with movement, repeat and condition cards, and another team runs it like a computer that does not improvise. If the result is not what was expected, they must find the bug and fix it. It builds sequencing, loops and logical reasoning.

Illustration of the PE activity Movement Program: Loops, Conditions and Debugging
PhaseMain activity
Duration25 min
Ages8–12
SpaceOutdoor yard
Equipmentcards, cones
IntensityModerate
▶ Run it in class with a timerFree, no sign-up needed: "Movement Program: Loops, Conditions and Debugging" opens as today's lesson on your phone.

How to play

  1. Show the cards: movements (jump, turn, clap, sidestep, crouch), a repeat card (“repeat 3 times”) and a condition card (“if the cone is red, turn; if not, go forward”). A volunteer runs a three-card program (4 min).
  2. Pairs: one pair writes a four-card program and the other runs it exactly as written, changing nothing. Then they swap roles (6 min).
  3. Add the repeat card: program eight movements using only three cards. The group sees how the program gets shorter (5 min).
  4. Place a row of red and blue cones and use the condition card. The runner walks the row following the program and the pair debugs if something does not fit (5 min).
  5. Each team swaps its program with another, runs it and talks about the bugs they found and how they fixed them (5 min).

Rules

Variations

Easier

Three-card programs without repeats.

Standard

Four to six cards with a repeat and one condition.

Harder

Programs with two nested repeats and several conditions.

Adaptations

Learning goals

Equipment for a class of 25

Teacher tip

Do not correct the programmer: let the error show when it runs. Prepare laminated cards and one color per type. A good lead-in to any computational-thinking project in the classroom.

Add this activity to your lesson

PatioLab has "Movement Program: Loops, Conditions and Debugging" and 11999 more activities ready to drag into your lesson and run from your phone in the gym.

More main activities for Elementary

"Al Pasar la Barca" Parachute Rowing

⏱ 10 min👥 Ages 3–6📍 Any space
Equipment: Rainbow parachute

Sitting around the parachute, children row by pulling the fabric toward them and letting it go toward the middle to the rhythm of the traditional Spanish song "Al pasar…

Rhythm Moderate intensity

"Corro de la Patata" Parachute Circle

⏱ 10 min👥 Ages 3–6📍 Any space
Equipment: Rainbow parachute

Children circle with the parachute while singing the traditional Spanish song "Al corro de la patata" (Potato Circle), and on "achupé, achupé" everyone sits down…

Rhythm Moderate intensity

"El Patio de Mi Casa" Parachute Song

⏱ 10 min👥 Ages 3–6📍 Any space
Equipment: Rainbow parachute

Children sing the traditional Spanish ring song "El patio de mi casa" while circling with the parachute and lowering it to the ground on "agáchate" (squat down).

Rhythm Moderate intensity

"Que Llueva" Parachute Rain

⏱ 10 min👥 Ages 3–6📍 Any space
Equipment: Rainbow parachute

Using the traditional Spanish children's song "Que llueva, que llueva" (Let It Rain), children make rain, clouds and sun with the parachute, and some hide underneath as…

body expression Moderate intensity

«A la Zapatilla por Detrás»: The Slipper Behind Your Back

⏱ 12 min👥 Ages 3–6📍 Any space
Equipment: House slippers

Sitting in a circle with eyes covered, one child walks around the outside with a slipper singing the traditional Spanish rhyme «A la zapatilla por detrás» («the…

listening attention Moderate intensity

«A Tapar la Calle»: The Chain That Blocks the Street

⏱ 12 min👥 Ages 3–6📍 Outdoor yard
Equipment: No equipment

Half the class forms a hand-in-hand chain that walks forward singing the traditional Spanish song «A tapar la calle» («Block the street so nobody passes»), while the…

coordinated group movement Moderate intensity