Skip to main content

Can You Debug This Code?

Main Image
Information Technology

Learners develop debugging and critical thinking skills by fixing a code to help get a rocket ship to the moon

What You Need

Guide:

Safety Notes

  • Ensure you are familiar with Let's Talk Science's precautions with respect to safe delivery of outreach to youth. 
  • For younger ages, ensure proper support is provided for cutting with scissors. 

What To Do

  1. Learners collect the materials. 
  2. Learners cut out the paper code blocks to put together their code. 
  3. Learners start at the rocket ship, on the handout, and follow the code to see if the rocket ship completes its mission to the moon. 
  4. If learners find an error, they must try to alter the code to fix (debug) it.  
  5. Learners continue debugging their code until the rocket reaches the moon. 

Debugging is finding and correcting errors, referred to as bugs. Bugs in a computer program could be due to syntax errors (e.g., spelling mistakes) or logic errors. During the activity, learners encounter instructions that require debugging, to allow their rocket ship to successfully reach the moon. 

As technology advances, it is more important than ever that people contribute to the digital world. Building computational thinking skills, such as critical thinking and debugging, and strengthening understanding of computational thinking concepts, such as sequences, will help learners prepare for the future.   

Critical thinking involves addressing complex problems by interpreting information to make informed judgments. This activity required learners to analyze the problem and decide what to do with the information they received. Being able to think critically is an important skill to have that helps learners become constructive citizens and interact with the world in meaningful ways. Knowing how to fix errors is an important skill for solving problems in the digital and physical world.  

  • For older ages, try the second handout Debugging Space Race Repeat which uses repeat blocks in the code. 
  • Make a big grid on the ground with tape and see if you can follow your code by walking in the grid squares. 

Can You Debug This Code? - Activity Overview

Can You Debug This Code? - Debugging Space Race Template

Can You Debug This Code? - Debugging Space Race Repeat Template

Can You Debug This Code? - Space Race Coding Blocks Sprites

 

What's Happening?

Debugging is finding and correcting errors, referred to as bugs. Bugs in a computer program could be due to syntax errors (e.g., spelling mistakes) or logic errors. During the activity, learners encounter instructions that require debugging, to allow their rocket ship to successfully reach the moon. 

Why Does It Matter?

As technology advances, it is more important than ever that people contribute to the digital world. Building computational thinking skills, such as critical thinking and debugging, and strengthening understanding of computational thinking concepts, such as sequences, will help learners prepare for the future.   

Critical thinking involves addressing complex problems by interpreting information to make informed judgments. This activity required learners to analyze the problem and decide what to do with the information they received. Being able to think critically is an important skill to have that helps learners become constructive citizens and interact with the world in meaningful ways. Knowing how to fix errors is an important skill for solving problems in the digital and physical world.  

Investigate Further

  • For older ages, try the second handout Debugging Space Race Repeat which uses repeat blocks in the code. 
  • Make a big grid on the ground with tape and see if you can follow your code by walking in the grid squares. 

Resources

Can You Debug This Code? - Activity Overview

Can You Debug This Code? - Debugging Space Race Template

Can You Debug This Code? - Debugging Space Race Repeat Template

Can You Debug This Code? - Space Race Coding Blocks Sprites