Use a Peanut Butter & Jelly Sandwich to Introduce Coding to Your Kid

35i1th7

Categorized under: kids home coding exercises

When you provide a computer with a set of instructions (lines of code) to execute, the machine does not have the ability to interpret context or ask questions to gain additional clarity like we humans do; the computer simply does exactly what it is told. To illustrate this concept, we are going to have your child (programmer) write down the instructions to make-a-sandwich and the parent (computer) will execute the instructions.

Let’s get started…..

Step 1: Child (1 minute) – Pick the type of sandwich (Example: Peanut Butter & Jelly or Grilled Cheese) you would like your parent to prepare.

Step 2: Child (1 minute) - Give your sandwich recipe a name (Example: Mike’s World Famous PB&J Sandwich).

Step 3: Child (5 minutes) - Write down the exact steps (recipe), in detail, your parent will need to follow in order to make the perfect sandwich. Include all ingredients, materials & utensils that will be needed. DO NOT skip any steps.

Step 4: Child (2 minutes) - Review the steps to ensure that if your parent follows the recipe exactly, they will be able to make the sandwich.

Step 5: Parent/Child (5 minutes) - Provide the recipe to your parent and have him/her make the sandwich.  You can not interpret the recipe steps or assume that your child meant for you to do things a certain way. You must literally follow the steps exactly as written. (Example: Unless the recipe specifically tells you to un-wrap the cheese slice, you must place the wrapped cheese slice on the sandwich).

Step 6: Recap (2 minutes) - Once the sandwich is complete, briefly discuss the output with your child using the following questions as a guide:

  • Did you prepare the sandwich as your child expected?
  • Were there any areas where your literal interpretation created preparation challenges?
  • What surprised you about watching your parent follow your recipe?
  • What would you have changed about your instructions to make the recipe easier to follow for your parent?
If your child enjoyed the sandwich making project, why not try a FREE class at Digital Adventures North Shore Learning Studio? We offer after-school programs for kids in 1st-8th grade on topics including 3D Printing, Visual Programming, Video Game Design, Robotics & Minecraft Modding. Our programs are project-based and generate either a digital or physical artifact at the conclusion of each session. For more information, visit our website at www.digitaladventures.com or give us a call: 844-KID-CODE (543-2633).

-Developing future inventors & innovators!

Digital Adventures offers computer coding classes, camps, birthday parties, and makers workshops for kids in 1st-8th grade on a variety of digital technology topics including 3D Printing, Visual Programming, Video Game Design, Robotics & Minecraft Modding. Our programs are project-based and generate either a digital or physical artifact at the conclusion of each session. Check out our Facebook (5 Stars) & Yelp (5 Stars) reviews to see what other parents think about our programs. For more information, visit our website at or give us a call: 844-KID-CODE (543-2633).