This messy but always fun Rosie Explores activity introduces kids to algorithms, functions, loops, bugs and the need for specificity in coding as they attempt to “code” a robot!
It’s best to do this with at least three people – a programmer, a robot, and a scribe to record the algorithm (the steps needed to complete the peanut butter and jelly sandwich). That way you can look back at each line of code and see where there may be “bugs” or errors in your instructions. You can also discover how you might create functions and loops to repeat steps that need to happen over and over again! This activity works great in larger classrooms too as you can designate groups of students to be scribes and programmers.
As this is an introductory coding activity, it includes some computing terms that might be new to kids:
Algorithm – a process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.
Function – a block of organized, reusable code that is used to perform a single, related action.
Loop – a control flow statement for specifying iteration, which allows code to be executed repeatedly.
Bug – an error, flaw or fault in a computer program or system that causes it to produce an incorrect or unexpected result, or to behave in unintended ways.
Ready to become a robot and make a PB&J? Watch the video for an overview, gather the materials listed at the right, and follow the instructions below!