Computer Science 111. Fall, 2006

Homework #4

due: by midnight on October 4

Note: Make sure the inputs required of the user are exactly as specified and in the right order. Your task in this week's homework is to make a better version of the interactive conversation program.

Part 1. Get a copy of the file hw4Judy.pyc from my handout directory (with the command getcopy hw4Judy.pyc).
import hw4Judy and then hw4Judy.main().

Use emacs to write your own version of the program. Here is what your program should do:

Notes and Reminders

Don't worry about punctuation marks.

The total number of inputs from the user should be 1 for the number of interactions, plus exactly the same number of strings from the user as is indicated in num_interactions.
In other words the total number of inputs from the user is num_interactions+1. The first is an integer and the rest are strings. If you are unsure, count them as you run your program and type in the strings.

Remember, all of the interaction must be appended to the list stored in conversation. This means that each string the user types in must be appended, and the computer's response appended.

Your final program should be in a file called hw4.py Submit this homework by the due date with the command submit homework4 hw4.py