CS120
Assignment #2
Due at the beginning of lecture, Friday Jan 29th.
For this assignment you will be modifying the NIM program from Chapter 3 of the text
(the full program is also available on the course schedule). To complete the
assignment make the following modificaitons:
- (Chapter 3, Exercise 1) Change the output of the program to make it
more interesting. For example, change the winning and losing messages.
- (Chapter 3, Exercise 2) Have the program begin by printing the rules
of the game.
- (Chapter 3, Problem 6) Include running commentary in the game. Use
if statements to check the number of items remaining and print appropriate
messages.
- As always add a comment block to the beginning of the program with your
name, section number, date, and the lab number.
Turn in: Use the script command to generate the output of the
program. Print and turn in a copy
of the code and a copy of the output of the code.