877-542-5504 877-542-5504

Want to Help Fellow Teachers?

Please help us grow this free resource by submitting your favorite lesson plans.

Lesson Plan #: AELP-EDT0200
Submitted by: Deb Sweeney
Email: sween4@yahoo.com
School/University/Affiliation: Tamaqua Area Middle School, Tamaqua, PA

March 6, 2001

Grade Level: 6, 7, 8


  • Computer Science
  • Language Arts/Writing

Duration: 45 minutes

Description: Students will learn the importance of written communication skills and sequential thinking while trying to write a computer program on how to make a peanut butter and jelly sandwich. Teachers can use this activity as an introduction to writing computer programs.

Goal: To understand the importance of meaning what you say, or garbage in-garbage out, integrated with sequential thinking.

Objective: Students will write specific and sequential steps on how to make a peanut butter and jelly sandwich.

Teacher Materials:

  • peanut butter
  • jelly
  • bread
  • butter knife
  • napkins

Student Materials:

  • paper and pencils

Vocabulary: garbage in-garbage out – This phrase means that if a programmer states inaccurate or incorrect steps (garbage), the computer will output garbage as well. Procedure:  
Students will write a very detailed and step-by-step paragraph on how to make a peanut butter and jelly sandwich, for homework. The next day, the students will input (read) their instructions to the computer (teacher). Then the teacher will make the programs, being sure to do exactly what the students say. For example, if a student says, Take a piece of bread out of the bag, the teacher takes only a small piece out instead of a slice (which is what the student actually meant).

As a follow-up, students can edit their computer programs and have a peer read through them for clarity. As an extension, students can write directions for another how-to-do activity. Students can give their directions to another student to see if that student can follow the program without any problems.

Assessment: This activity is not one that can be graded, but each student should complete the homework assignment and turn it in for the teacher to review. 

Special Comments: Students have a great time with this assignment, because they can actually see their errors, or bugs, in their programs when their sandwiches are only 1 square! Also, I would like to give credit to Mrs. Holly Morrison, who was the initiator of this great lesson!