# Algorithm Picture Lesson

## Overview

The goal of this activity is to build critical thinking skills and excitement for Computer Science / Computational Thinking, while laying a foundation of fundamental programming concepts. By scaffolding basic concepts like sequencing and algorithms in an unplugged activity, students who are intimidated by computers can still build a foundation of understanding. In this lesson, students will learn how to develop an algorithm and encode it into a program.

By "programming" one another to draw pictures, students experience some of the core concepts of programming in a fun and accessible way. The class will start by having students view a video of a simple program demonstrating how to develop instructions for building a peanut butter and jelly sandwich. Students will start with simple shapes, and progress to the coding of a specific drawing that other students will then try to replicate (“running the program”).

If there is a desire to have a more of a Math slant on the lesson, the drawing could take place on graph paper. Students would then use the coordinates to complete the drawing.

# Algorithm Picture Lesson

**Click here for access to all resources needed for this lesson.**

The Big IdeaThe goal of this activity is to build critical thinking skills and excitement for Computer Science / Computational Thinking, while laying a foundation of fundamental programming concepts. By scaffolding basic concepts like sequencing and algorithms in an unplugged activity, students who are intimidated by computers can still build a foundation of understanding. In this lesson, students will learn how to develop an algorithm and encode it into a program. | ||||

Topic / ProblemBy "programming" one another to draw pictures, students experience some of the core concepts of programming in a fun and accessible way. The class will start by having students view a video of a simple program demonstrating how to develop instructions for building a peanut butter and jelly sandwich. Students will start with simple shapes, and progress to the coding of a specific drawing that other students will then try to replicate (“running the program”). If there is a desire to have a more of a Math slant on the lesson, the drawing could take place on graph paper. Students would then use the coordinates to complete the drawing. | ||||

Learning ObjectivesIn this lesson students will be able to identify that computers complete actions based on a set of directions. These “directions'' are called algorithms. Students will be able to reframe a sequence of steps as an encoded program and explain constraints of translating problems from human language to machine language. | ||||

Engage - [15 mins]In this activity, students will encode instructions to guide each other toward replicating drawings without letting the rest of their group see the original image. While students may think that assembling a PB&J sandwich is a relatively simple task, they may fail to understand the number of details needed to successfully complete the task of making a PB&J sandwich.This warm-up frames the activity for the class.Giving instructions to a computer can sometimes be tricky because although computers are very fast, they are not actually very smart! When we program computers we need to make sure that our algorithms are very specific so the computer actually does what we want it to do. Have the students watch Exact Instructions PB&J Instructions (6:44). Discussion questions- What algorithm did the children in the video need to write?
- What errors did they run into trying to write their algorithms, and how did they fix(debug) those problems?
- Break a whole problem down into small steps (decomposition);
- Create step-by-step instructions (develop algorithms);
- Make sure the steps are in the right order (analyze);
- Ensure the steps are very precise and specific, and make corrections (analyze, debug);
- Repeat the process as needed in order to make necessary adjustments (build models, iterate).
| |||

Explore - [10 mins]Write your own algorithm for Activity #1 - As a class, come up with an algorithm for a common activity (like pouring a bowl of cereal or brushing your teeth).Use this activity to model to the class how they should set out their algorithm —start with a statement defining the problem, and then write out the algorithm as a clear sequence of instructions. See below:If time allows, have students come up with their own algorithms (individually or in pairs). Here are a few suggestions:- How students pour a drink
- How students style their hair
- Have students write technical instructions for how to perform a task of their choosing using technology, such as installing an app on a mobile device.
| |||

Explain - [25-30 mins]Part 1: While using Activity #2 each step on the slide is presented one at a time. While presenting this information to students be sure to tell them to do their best, and to make a note where they might be a bit confused with the directions.While on step 6, ask the students to share their drawing. Show them what the directions should have produced (sailboat).Discussion Questions- Why don't many of the pictures look like the original? (Interpretation: everyone has a different interpretation, directions were not clear, not able to give or get feedback).
- What were your frustrations as the source of the message (giving instructions?, as the receiver of the message (person drawing)?
Part 2: Divide the students into groups. Appoint one student to be the encoder for a new picture. Pictures can be viewed here. The encoder should produce an algorithm that the other students can decode into a picture. Be sure to remind them that they need to be as specific as possible when describing the image. Once students have finished the algorithm and have produced an image, compare the drawn image to the actual image. Ask the students to debug the set of instructions. What could be clarified, added to produce a better final image? If time remains allow each student to go through the process of encoding an image for other students. Ask the students to debug the set of instructions. What could be clarified or added to produce a better final image? | |||

Elaborate / Application [15 mins]Watch the Egg Drawing Robot (3:15) video to give students context for the types of things that robots can do.Discuss: How do you suppose that robots know how to do the things that they do? Do they have brains that work the same way that ours do?Work this into a discussion explaining people have to program robots to do specific things, using specific commands. The goal of this quick discussion is to call out that while robots may seem to behave like people, they're actually responding only to their programming. Students will likely refer to robots from movies and TV that behave more like humans. Push them to consider robots that they've seen or heard of in real life, like Roombas, or even digital assistants like Amazon’s Alexa. | |||

Evaluate / Learning Analysis- Set up an obstacle course and have students write instructions to get from one end to the other, then test each other’s instructions. Remind students they need to follow the instructions exactly as they are written (a computer cannot infer what a human really meant to say)!
- Ask groups of students to all develop an algorithm for a common image/task with the purpose of being as concise and accurate as possible. The group that develops a successful algorithm with the fewest steps wins.
| |||

Accommodations / Differentiation (Tips to meet the needs of all learners.)- As an alternative to students using written words they can devise a system of symbols that represent written words. This lesson is an example of how to use symbols instead of written words.
- Graph paper may be used to incorporate math strategies/vocabulary.
- Directional terms such as North/South/East/West could be used to reinforce geography skills.
- Students with experience may recognize opportunities for adding loops, conditionals, etc.; an algorithm could be created using typical coding language, such as this PB&J example.
- Students may become leaders if they have experienced this activity and/or grasp the concepts quickly.
| |||

Extending the LearningChallenge: Make a difference in your school and community!Take a hard look at your school and local community, identify a Big idea (pollution, water quality, voting, communication, transportation, etc.) Use the CBL process (from the above link) to frame a challenge, learn about it, and develop an app that solves the problem. |

LESSON / RESOURCES REVIEW |

The computer science department values the opinions of all of our fellow educators. We strive to create lessons that meet the needs of all learning styles. Please use this form to review the computer science lesson you completed with your students.LESSON / RESOURCES REVIEW |