Assignments that teach Conditionals
Using the Finch begins to get interesting when conditional structures are added to the mix. Typically students learn conditionals before iteration, and thus the types of assignments that can be created often rely on matching a sensor reading taken at the beginning of program execution to interesting output. Some examples include:
- Using RSS feeds to grab weather or movie data, and having the Finch react to the data in some way.
- Telling the user what orientation the Finch is in.
- Using the temperature or light sensors to tell the user whether it is warm/cold or bright/dark in the room.
Setting up Iteration
Iteration and conditionals go hand-in-hand, and many students intuitively realize that their programs could be much more compelling if they could somehow make them run continuously. Assignments that focus on conditionals can leverage this intuition to set students up for the concept of iteration by having the students re-run the program for many test cases, or by creating a two-part assignment where the second part involves adding a loop to the program created in part one.