Skip Navigation

Speed Stacker

By Thinkersmith 30 minutes
For Everyone
English Language Arts,
  • Programming
Tools & Languages

Key Coding Concepts

  • Algorithms
  • Debugging



A step-by-step set of operations to be performed to help solve a problem



Finding problems in code and solving them



Exploring connections between the whole and the parts.

This activity reinforces basic computational thinking through using code to build cup towers. Learners will work in pairs as ‘robots’ and ‘programmers’ to write out algorithms, or step-by-step instructions, for each other, then debug and problem-solve their code together.

This activity was created by Thinkersmith for Hour of Code


  • Plastic cups (10 per pair)
  • Paper and pencils

Before the lesson...

Run through this example as a class.

Pair up learners. One person will begin as the programmer, and one as the robot.

Programmer instructions:

  1. Choose a Cup Stack sheet from the pile (don’t show the robot!)
  2. Use the symbols from the Symbol Key to write instructions for the robot to follow, in order to build this cup tower
  3. Give the robot your instructions
  4. After the robot has finished, debug your code (catch any problems and try to solve them). Write new instructions and try again, if needed.

Robot instructions:

  1. Take the cups and practice stacking them away from the programmer
  2. When the programmer calls you over, use their instructions to build a tower. Use the Symbol Key to decode their step-by-step instructions.
  3. When you are finished, check to see if the tower looks the same as the Cup Tower sheet. If it does not, work with the programmer to fix the instructions.
  4. Try again! Keep debugging until the instructions are correct.

After running through once, learners will switch roles with their partners.

Learning Outcomes

We created and decoded algorithms (our cup stacking instructions).
We learned the importance of sequences and clear instructions in coding.
We worked with our partners to debug (or fix) our instructions.
We practicing modularizing by breaking down a larger task into smaller parts.

Assessment Ideas

Have pairs submit their final instructions with a written reflection outlining their debugging process.

Make it into a competition!

  1. Have pairs sit back-to-back, with the programmers facing you and the robots looking away (no peeking towards the front!)
  2. Show all programmers the same tower at once and have them race to write down an algorithm for their partner to build
  3. When they are finished, then can pass their written algorithm to their robot partner (robots must still face away - no peeking!)
  4. Robots with an algorithm can begin building their cup tower. Programmers may watch and take away the paper at any time to “debug” and adjust their code before returning it to their robot.
  5. Whichever pair successfully builds the tower first, wins!

Original Lesson by Thinkersmith

Teach lessons that are tied to your existing curriculum!


More Lesson Plans For For Everyone

    View All Lesson Plans

    Explore lessons based on components

    The K-12 Computer Science Framework

    Although learning how to build digital projects is a key part of Computer Science education, students should also learn a wider set of skills and competencies that will help them to harness the power of digital technologies as both creators and consumers. A comprehensive approach to K-12 Computer Science education includes learning about the following five focus areas:

    View Framework ➝


    By the end of high school, students should be able to create a simple computer program.

    Computing and Networks

    By the end of high school, students should understand and be able to use the tools and devices commonly used to build digital projects.


    By the end of high school, students should be able to explain how we use computers to create, store, organize, and analyze data.

    Technology and Society

    By the end of high school, students should be able to explore the ways in which technology and society have mutually shaped each other.


    By the end of high school, students should be able to apply design principles to the digital projects they create.