Use the commands below to pick up all of the fruit and put them into the correct boxes. Once all the fruit is in a box, you have won!
| Command | Foobot action |
| ahead(n) | Move forwards n squares |
| back(n) | Move backwards n squares |
| left(n) | Turn left 90 degrees n times |
| right(n) | Turn right 90 degrees n times |
| lift() | Lift a fruit if it is in front of foobot |
| drop() | Drop a fruit that foobot is carrying |
| peek() | This function returns a letter corresponding to the fruit that Foobot is currently facing. "a" for apple, "b" for banana etc. and "" if there is no fruit |
Foobot needs to:
The code would look like this:
ahead();
lift();
right();
ahead();
drop();