Unplugged Activity: Slap, Clap, Snap

This is a simple, fun race that gives students a chance to practice the concept of using variables to vary the actions of code.

There are three variables:

  • Slap (player slaps their thighs or their desk)
  • Clap (player claps their hands)
  • Snap (player snaps their fingers)

The teacher assigns values to each of these movement variables, and then the players work together to try to show those values to the rest of the class.

Each of these movements takes a number that tells the player how many times to slap, clap, or snap.


  • Whiteboard
  • Index cards or paper

Play it

The computer metaphor

  • In each round, two students will become the computer.
  • One student will fetch the stored information from memory while the other student outputs the stored numbers for everyone to see.

The procedure

  • Demo the three different movements in order: slap, clap, and snap. Write the order on the board.
  • Split the class up into teams.
  • One student from each team will sit with an index card turned upside down near them. They will need to reach for this, so make it convenient. Alternatively, you could have a third teammate show the card.
  • The index card or paper will have three numbers on it. The first number is the number of slaps, the second is the number of claps, and the third is the number of snaps.
  • Another student will be at the whiteboard ready to write.
  • When the teacher says “Go,” the three variables are shown. The student in the chair performs the actions, and the person at the board writes down the numbers as they watch the teammate in the chair perform them. The student at the board does not get to see the index card. This is a relay race.
  • The first team to finish correctly wins.
  • Play several rounds or to a set victory number.

To keep gameplay balanced, teams should have the same total number of actions. This will take a little preplanning but will ensure that the game is fair.

For example, assume you have three teams. Their first cards with the three variables might look like this:

Team 1

  • Slaps = 2
  • Claps = 1
  • Snaps = 4

Team 2

  • Slaps = 1
  • Claps = 4
  • Snaps = 2

Team 3

  • Slaps = 4
  • Claps = 1
  • Snaps = 2

The number of slaps, claps, and snaps for each team is different, BUT they are all performing a total of seven actions, so it is relatively fair. Also, because the actions are varied like this, nobody can cheat by looking at another team.


  • Change the order of the actions from slap, clap, and snap TO clap, snap, and slap.
  • Let students suggest different movements to add to the slap, clap, and snap sequence. They can then add another variable.