Using physical activity to explain the nested for loop
Your pupils are already be doing nested loops.

foreach week {
   foreach weekday{
      wake up
      clean teeth
      eat breakfast
      goto school
      foreach period{
         goto class
         do lesson
      }
      go home
      do evening stuff
   }
   do saterday stuff
   do sunday stuff
}


What about some formulaic music.

Music has a lot of repetition, could you get them to play some music based on a nested loop algorithm. I am thinking drumming on tables, and a lot of shouting.

e.g. something like


Repeat 4 times:


Teacher says: “say yo 3 times”.
Teacher says: “clap 4 times”
Teacher says: “…”



Sorting algorithms — dance, or just moving about.

Get pupils to act out sorting algorithms. And identify the loops.
Here is how to do it in the form of dance http://youtube.com/watch?v=lyZQPjUT5B4