There were a couple of typos in Programming Assignment #1, involving Part 4. These typos made it look like the messages those programs should write are not supposed to be terminated with the newline. But that's wrong. Those messages should be terminated with the newline. For example, in Part 4, when you write the message 5 times, each message should be on its own line.
Several people said they didn't understand the grade command. I've now reworded the description of how to turn in your program using the grade command, so hopefully it will now be clearer exactly what you have to do.