While Loop Example-Spell Letter Z


We’re beginning to flesh out the details of more advanced Penjee coding challenges, ones that require loops.

We are adapting a Jeroo assignment , that I wrote for my student coders, and  we are applying it to Penjee.

The goal of this assignment is straightforward :  “Spell the letter Z’ by dropping Fish .  Kids have to start with their Penguin in the top left, and use while loops to traverse travel in a “Z” pattern dropping fish.



This  is one of many assignments that we will use twice.  In the first pass, kids can code 3 separate loops , one for each part of the letter “Z”.

Then in a future unit, the students will need to code a single loop and use more complex boolean logic. Below is an example of 1 solution using multiple loops.