Each team's program needed the following components:
- The computer would generate a random number (between 1 - 100)
- The code would include a series of IF or IF-ELSE statements.
- The program needs to display the appropriate answer (i.e.. Divisible or Not Divisible)
To introduce the concept (of IF-THEN statements), I read the short-story to the students , Computational Fairy Tales - Learning IF-THEN-ELSE the hard way.
IF the food is on the 'finished' table
You can eat it.
Do not eat it.
Of course, as any three year old is bound to do, Ann ignored these instructions. She would sneak into the kitchen and eat pieces of fruit off of the chef's prep table. Each time that the chef caught her, he would give her a lecture about obeying the IF statement. His lectures would last a full ten minutes and include at least one remark about "kids these days". Ann enjoyed listening to him describe the branching logic of the IF statement almost as much as she enjoyed sneaking fruit. In fact, some days she even made sure that she was caught so that she could listen to his rants. ........