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.
How to play
- 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).
- Pairs: one pair writes a four-card program and the other runs it exactly as written, changing nothing. Then they swap roles (6 min).
- Add the repeat card: program eight movements using only three cards. The group sees how the program gets shorter (5 min).
- 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).
- Each team swaps its program with another, runs it and talks about the bugs they found and how they fixed them (5 min).
Rules
- The runner does exactly what the cards say, even if they see an error.
- Cards are not changed during the run.
- Movements are slow and without collisions.
- If the program fails, note the error and fix it without mocking anyone.
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
- Students who use wheelchairs: replace jump and crouch with arm movements and chair turns.
- Students with reading difficulty: cards use pictograms and colors.
- Students with ASD: use a fixed order of cards and see a solved example before starting.
Learning goals
- Order a sequence of instructions precisely
- Understand simple repeats and conditions
- Detect and fix bugs in a plan
Equipment for a class of 25
- Cards: 60
- Cones: 16
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.
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
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…
"Corro de la Patata" Parachute Circle
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…
"El Patio de Mi Casa" Parachute Song
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).
"Que Llueva" Parachute Rain
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…
«A la Zapatilla por Detrás»: The Slipper Behind Your Back
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…
«A Tapar la Calle»: The Chain That Blocks the Street
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…