Lesson 7: Programming in Maze

Overview

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.

Purpose

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.

Agenda

Warm Up (10 min)

Bridging Activity - Programming (10 min)

Main Activity (30 min)

Wrap Up (5 - 10 min)

Extended Learning

View on Code Studio

Objectives

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.

Preparation

Links

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

For the Teachers

For the Students

Vocabulary

  • 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.

Support

Report a Bug

Teaching Guide

Warm Up (10 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.

Introduction

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 My Robotic Friends 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 a pattern from Stacking Cup Ideas - Manipulatives from the My Robotic Friends unplugged activity. Using arrows from the [course-ab-blockly-blocks], have the students program a "robot" from their desks to get the correct stacking of the cups. Make sure that they understand that the blocks need to go from top to bottom and they all need to touch! Have the students pair share to check answers and resolve any questions or bugs that may come up.

Previewing Online Puzzles as a Class

Pull a puzzle from the corresponding online puzzles. We recommend puzzle 8. Give students small note cards to draw out the various commands from the My Robotic Friend My Robotic Friends - Symbol Key. Have students lay out a pattern with the arrows they created that 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:

CSF Pre-Express Course

Teacher Tip:

Show the students the right way to help classmates by:

  • Don’t sit in the classmate’s chair
  • Don’t use the classmate’s keyboard
  • Don’t touch the classmate’s mouse
  • Make sure the classmate can describe the solution to you out loud 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)

Journaling

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?
  • Write a program that gets you from your desk to the front of the classroom.
  • What is a bug? What does a bug do to your program?

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 (2017)

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.