Your programs will have 3 levels of documentation.
Use the template provided: Program Template for a Menu Driven Program.
Give your program an appropriate name.
1. Magic number. Write a program that generated a number between 1 and 10. Have the user guess at the number. Display appropriate messages as the user guesses. Keep track of and display the following information when the user either quits or guesses correctly:
The magic number
Did the user win or quit?
Total guesses
2. Coin toss game. Toss a coin many (how many is many?) times and for each head add one to a counter and for each tail subtract one from the counter. Display the counter versus the number of tosses.
3. The Tortoise and The Hare. Have the tortoise and hare complete a race of x units long. The user will decide on the length of the race. You should decide what a minimum race length should be. Use a random number to determine the distance each travels per unit time. On each turn, display the current position of both the tortoise and the hare.
Tortoise:
50% 3 squares ahead
20% 6 squares back
30% 1 square ahead
Hare:
20% no move
20% 9 squares ahead
10% 12 squares back
30% 1 square ahead
20% 2 squares back
Formative Evaluation