Lesson 6: Programming in Maze

Algorithms | Debugging | Program | Programming


In this series of online puzzles, students will build on the understanding of algorithms, debugging, and general computer literacy. Featuring characters from the game Angry Birds, students will develop sequential algorithms to get the bird to the pig without crashing into walls or TNT. Debugging puzzles have also been mixed into this stage for added practice with problem solving and critical thinking.


In this lesson, students will be practicing their debugging and programming skills on a computer platform. When someone starts programming they piece together instructions in a specific order using something that a machine can read. Through the use of programming, students will develop an understanding of how a computer navigates instructions and order. Debugging is a concept that is very important to computer programming. Computer scientists have to get really good at facing all of the bugs in their own programs. Debugging forces the students to recognize problems and overcome them while building critical thinking and problem solving skills.


Warm Up (5 min)

Bridging Activity - Programming (10 min)

Main Activity (30 min)

Wrap Up (5 - 10 min)

Extended Learning


Students will be able to:

  • Order movement commands as sequential steps in a program
  • Represent an algorithm as a computer program
  • Develop problem solving and critical thinking skills by reviewing debugging practices.



Heads Up! Please make a copy of any documents you plan to share with students.

For the Teacher


  • Algorithm - A list of steps to finish a task.
  • Bug - Part of a program that does not work correctly.
  • Debugging - Finding and fixing problems in an algorithm or program.
  • Program - An algorithm that has been coded into something that can be run by a machine.
  • Programming - The art of creating a program.


Report a Bug

Teaching Guide

Warm Up (5 min)

Teacher Tip:

Review cardinal directions with your class.

Let students know that they will see those letters in their programs next to the direction arrows. We recommend drawing the directions somewhere that the students can look back up to review.


Ask your students if they are familiar with the game or the movie "Angry Birds". Explain that they will be writing programs to help Red, from Angry Birds locate a Pig.

Bridging Activity - Programming (10 min)

This activity will help bring the unplugged concepts from Happy Maps into the online world that the students are moving into. Choose one of the following to do with your class:

Unplugged Activity Using Paper Blocks

Select an empty Flurb map from the Happy Map Cards - Worksheet and give students Unplugged Blockly Blocks (Grades 1 - 2) - Manipulatives prefilled with cardinal commands like E → (East) and W ← (West). Now, have the students program the Flurb from their desks using the paper Blockly blocks to get the Flurbs to the fruit. Make sure that they understand that the blocks need to go from top to bottom and they all need to touch!

Previewing Online Puzzles as a Class

Pull a lesson from the puzzles corresponding to this lesson. We recommend puzzle 7. Using arrows from the Happy Map Game Pieces - Manipulatives, have students lay out a pattern that they think will get the bird to the pig. Ask the students to share. See how many other students had the same answer!

Main Activity (30 min)

Teacher Demonstration

We've included some multiple choice prediction levels that are difficult for non-readers. Like the puzzles in the bridging activity, these levels are optional for you to review with your class to help prepare for the puzzles to come. Alternatively, these could be used after finishing the stage as a review for the class.

Prediction Levels:

Course A Online Puzzles - Website

Teacher Tip:

Show the students the right way to help classmates by:

  • Don't sit in their chair
  • Don't use their keyboard
  • Don't touch their mouse
  • Make sure the classmate can describe the solution before you walk away

Teachers play a vital role in computer science education and supporting a collaborative and vibrant classroom environment. During online activities, the role of the teacher is primarily one of encouragement and support. Online lessons are meant to be student-centered, so teachers should avoid stepping in when students get stuck. Some ideas on how to do this are:

  • Utilize Pair Programming - Student Video whenever possible
  • Encourage students with questions/challenges to start by asking their partner
  • Unanswered questions can be escalated to a nearby group, who might already know the solution
  • Remind students to use the debugging process before you approach
  • Have students describe the problem that they’re seeing. What is it supposed to do? What does it do? What does that tell you?
  • Remind frustrated students that frustration is a step on the path to learning, and that persistence will pay off.
  • If a student is still stuck after all of this, ask leading questions to get the student to spot an error on their own.

Wrap Up (5 - 10 min)


Having students write about what they learned, why it’s useful, and how they feel about it can help solidify any knowledge they obtained today and build a review sheet for them to look to in the future.

Journal Prompts:

  • What was today’s lesson about?
  • How did you feel during today’s lesson?
  • What's something you shouldn't do while helping a friend with a puzzle?
  • Why do you think debugging is important?

Extended Learning

In small groups, let students design their own mazes on paper and challenge other students or groups to write programs to solve them. For added fun, make life-size mazes with students as the pig and bird.

Standards Alignment

View full course alignment

CSTA K-12 Computer Science Standards

AP - Algorithms & Programming
  • 1A-AP-09 - Model the way programs store and manipulate data by using numbers or other symbols to represent information.
  • 1A-AP-11 - Decompose (break down) the steps needed to solve a problem into a precise sequence of instructions.