Create a robot that acts like a squirrel!

Lesson Level

Advanced I

Created By

This activity was created by Tom Simpson at Heathwood Hall Episcopal School.

Programming Language





4-5, 6-8, 9-12

Free Teacher Materials

Get Access


This activity is aligned with Common Core math standards that deal with inequalities (4.NBT.A, 5.NBT.A, 6.EE.B, and 7.EE.B), as well as random sampling (7.SP.A)

The SquirrelBot must stay alert for hungry birds of prey.  When he senses the dark shadow of a hawk above him, he needs to take random evasive action to confuse the hungry bird. Program four different escape maneuvers to allow your SquirrelBot to survive another day.

The requirements for this project are as follows:

  1. The Finch must detect when a shadow falls on either of the light sensors.
  2. When there is no shadow, the Finch should be still.
  3. When a shadow is detected, the Finch must make an escape maneuver.
  4. The Finch should have at least four possible escape maneuvers.
  5. Each time the Finch detects a shadow, it should randomly choose one of the possible escape maneuvers.

Hint: Make a variable called escapePlan. Each time the Finch detects a shadow, set this variable equal to a random number between one and the number of escape maneuvers. You can use the pick random block on the Operators menu to get a random number.