Lesson 2: Programming with Angry Birds
Overview
Using characters from the game Angry Birds, students will develop sequential algorithms to move a bird from one side of a maze to the pig at the other side. To do this they will stack code blocks together in a linear sequence, making them move straight, turn left, or turn right.
Purpose
In this lesson, students will develop programming and debugging skills on a computer platform. The block-based format of these puzzles help students learn about sequence and concepts, without having to worry about perfecting syntax.
Agenda
Previewing Online Puzzles as a Class (3 min)
Main Activity (30 min)
Wrap Up (5 - 10 min)
Extended Learning
View on Code Studio
Objectives
Students will be able to:
- Translate movements into a series of commands.
- Identify and locate bugs in a program.
Preparation
- Play through the puzzles to find any potential problem areas for your class.
- (Optional) Pick a couple of puzzles to do as a group with your class.
- Make sure every student has a Think Spot Journal - Reflection Journal
Links
Heads Up! Please make a copy of any documents you plan to share with students.
For the Students
- Think Spot Journal - Reflection Journal
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.
- Sequencing - Putting commands in correct order so computers can read the commands.
Support
Report a Bug
Teaching Guide
Previewing Online Puzzles as a Class (3 min)
Lesson Tip
Some students may struggle with turning their bird in the correct direction, particularly when the bird isn't facing up. Remind students that when we say turn left or right, we're giving directions from the bird's point of view.
Content Corner
Teaching this course as a class?
Our grade-aligned CS Fundamentals courses use unplugged lessons to build community and introduce tricky computer science concepts, including sequencing. Check out the lesson My Robotic Friends from Course C and Graph Paper Programming from Course D!
Model: Pull up Puzzle 5 to do in front of the class. While working through this puzzle with the class, remind students that making mistakes is okay and remind them that the only way to be successful is to be persistent.
Discuss: Does anyone know how to solve this puzzle?
As the teacher, you should decide if you will have the students tell you how to solve it from their seats, or come to the computer to drag the actual blocks in one-by-one.
Transition: Now that students have seen an online puzzle in practice, they should be ready to start solving puzzles of their own. Continue to the lab or bring out their classroom machines.
Main Activity (30 min)
Online Puzzles
Teacher Tip:
Show the students the right way to help classmates:
- 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
Circulate: 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 during the activity.
- 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.
Discuss: After providing students with end-of-class warnings, grab everyone's attention and get them to reflect on the experiences that they just had.
- Did anyone feel frustrated during any of the puzzles?
- Did anyone notice the need to be persistent?
Transition: Have students grab their Thinkspot Journals and take a moment to leave lessons for themselves.
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?
- Draw an activity you like to do that you struggled with the first time. Draw or describe how you got better.
Extended Learning
Use these activities to enhance student learning. They can be used as outside of class activities or other enrichment.
Create Your Own
In small groups, let students design their own mazes and challenge each other to write programs to solve them. For added fun, make life-size mazes with students as the pig and bird.
Student Instructions
For this puzzle, drag all of the blocks together and click "Run" to watch it go!
Student Instructions
Drag an extra move forward block out of the toolbox to finish your code.
Student Instructions
"This pig is ruffling my feathers."
There is one extra block that is going to cause the bird to crash.
Throw it away by unhooking it from the grey blocks and dragging it back to the toolbox.
Student Instructions
"Trace the path and lead me to the silly pig."
Avoid TNT or feathers will fly!
Student Instructions
"Follow this path to get me to the pig!"
Avoid the TNT.
Student Instructions
"Keep calm and help me find the bad pig. Otherwise I might get angry!"
Get the bird to the pig and avoid the TNT.
- Challenge
- 8
Student Instructions
"It's time to get angry!"
Challenge: This code has a lot of bugs. You'll need to remove some blocks and add others.
- Practice
- 9
Student Instructions
"Keep calm and help me find the bad pig."
- Predict
- 10
Student Instructions
Read through the code below very carefully. What will happen when you click "Run"?
The bird will end up one step short of the pig.
The bird will make it to the pig.
The bird will run into the TNT.
I don't know.
- Practice
- 11
Student Instructions
"Now, help me sneak up on the pig any way you want to!"
Student Instructions
The bird needs your help! The pig is hiding, and the goal is to find it.
Student Instructions
Sometimes there is more than one way to solve the same problem. Sometimes it's faster to go backwards than it is to go forwards!
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.
Cross-curricular Opportunities
This list represents opportunities in this lesson to support standards in other content areas.
Common Core English Language Arts Standards
L - Language
- 2.L.6 - Use words and phrases acquired through conversations, reading and being read to, and responding to texts, including using adjectives and adverbs to describe (e.g., When other kids are happy that makes me happy).
SL - Speaking & Listening
- 2.SL.1 - Participate in collaborative conversations with diverse partners about grade 2 topics and texts with peers and adults in small and larger groups.
Common Core Math Standards
G - Geometry
- 2.G.2 - Partition a rectangle into rows and columns of same-size squares and count to find the total number of them.
MP - Math Practices
- MP.1 - Make sense of problems and persevere in solving them
- MP.3 - Construct viable arguments and critique the reasoning of others
- MP.5 - Use appropriate tools strategically
- MP.6 - Attend to precision
- MP.7 - Look for and make use of structure
- MP.8 - Look for and express regularity in repeated reasoning
OA - Operations And Algebraic Thinking
- 2.OA.1 - Use addition and subtraction within 100 to solve one- and two-step word problems involving situations of adding to, taking from, putting together, taking apart, and comparing, with unknowns in all positions, e.g., by using drawings and equations with a sy
Next Generation Science Standards
ETS - Engineering in the Sciences
ETS1 - Engineering Design
- K-2-ETS1-1 - Ask questions, make observations, and gather information about a situation people want to change to define a simple problem that can be solved through the development of a new or improved object or tool.
- K-2-ETS1-2 - Develop a simple sketch, drawing, or physical model to illustrate how the shape of an object helps it function as needed to solve a given problem.
- K-2-ETS1-3 - Analyze data from tests of two objects designed to solve the same problem to compare the strengths and weaknesses of how each performs.