Assuming that a Jeroo is standing on a flower that is part of a group of flowers,
What will this method do?
sub z(){
while (isFlower(HERE)){
pick();
if (! isFlower(AHEAD)) {
turn(RIGHT):}
hop();
}
}
The pseudocode for this method says:
As long as the Jeroo is standing on a flower, do these 3 things:
{ 1-pick the flower.
2-if there's not a flower ahead turn to the right.
3-hop. }
This means that as long as there is a flower ahead the Jeroo will keep hopping and picking all flowers in a row.
At the end of a row, what will the jeroo do?
Explain how the Jeroo would pick this group of flowers if it started at the red flower? Would it be in rows, or in a spiral pattern and why? 