#2166. Peanut Butter and Jelly Programming

Computer, level: Middle
Posted Tue Mar 6 07:33:12 PST 2001 by Deb Sweeney (sween4@yahoo.com).
Tamaqua Area Middle School, Tamaqua, PA USA
Materials Required: Paper, pencil, peanut butter, jelly, bread, butter knife
Activity Time: one class period
Concepts Taught: Written communication skills and sequential thinking with writing computer programs.

Goal: To understand the importance of "meaning what you say", or "garbage in-garbage out", integrated with sequential thinking. "Garbage in-garbage out"-means that if a programmer states inaccurate or incorrect steps (garbage), the computer will output garbage as well.

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

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 then input (read) their instructions to the computer (teacher). The teacher will then "make" the programs, being sure to do exactly what the students said. For example, if they say, "Take a piece of bread out of the bag," the teacher would only take a small "piece" out instead of a slice (which is what they actually meant).

Assessment: I use this as an introduction to writing computer programs. I do not use it as a grade, except if the student did not do the assignment. 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!

*Special acknowledgement to Mrs. Holly Morrison, who was the initiator of this great lesson!