Clarifications and Hints

The links below include answers to student questions and instructor comments. They also include corrections to errors or ambiguities in the problem specifications. You should read them.

General hints - Regarding all assignments and best use of PC2.

Current Questions

Q: Shouldn't case 2's output in problem 11 be 45/7?
You are right, the handout was in error. Furthermore, case 4's output should be 11/10 (not 10/9). Download the latest document with the corrected problem 11 from http://personal.graceland.edu/~rsmith/classes/csit1200/problems

Q: How do you know when the end of input is reached?
So far, all of the problems are stated in such a way that either the first line gives you a count of how many cases will follow or the last line is an empty line, which tells you when the end of input is reached. In the former, you might use a for-loop since you know how many times to loop. In the latter, you will use while-loop. See the General hints link above (item #6). In one of the problems, there is a mixture of these ideas. The first input line tells you how many cases you are to input, but each case can be many lines until an empty line is encountered. In that situation, one would expect to use a for-loop with a while-loop inside of it since each case is terminated by an empty line.

Problems from previous weeks

Pig Latin Generator (#8) - Clarifications, corrections, and/or hints. [Updated: 2/10/2010]

Top Ten Words (#7) - Clarifications, corrections, and/or hints. [Updated: 2/8/2010]

Find and Replace (#6) - Clarifications, corrections, and/or hints. [Updated: 2/11/2010]

Final Patterns (#5) - Clarifications, corrections, and/or hints. [Updated: 2/9/2010]