Friday, March 26, 2010

LogoChip Challenge #3

For this challenge, Esther and I needed to construct a program that counts the number of times we pressed a switch and that every fifth time we pressed the switch, the light would flash.'

We first had to come up with a program that would count how many times we pressed the switch. Here is the program that we came up with.
Then we came up a program that would make the light flash every fifth time we pressed the switch. In order to achieve this, we reset the count back to zero after the fifth count so that the program would make the light flash at every multiple of five. Here is the program that we came up with:

No comments:

Post a Comment