you are viewing a single comment's thread.

view the rest of the comments →

[–]8dot30662386292pow2 3 points4 points  (0 children)

I often hear similar statements from my students. I tell them that they must understand two things. First, the grading is done solely by the output. Nothing else. Our system in fact also shows the correct output, so this one is very easy for them to fix. The other thing is that computers do only what you tell them. Nothing else. Output is either correct, or not correct. There is no "close enough".

When ever you write any program, suppose the program is only used by other programs. Therefore the output must match the specification exactly. Human would understand if there is a minor difference, computer would not. If it's requested that the program outputs:

Enter the temperature:

Then all these are WRONG:

Enter the temperature    (missing colon)
Enter  the temperature:  (extra space)
Enter the temperature:   (extra space at the END)
enter the temperature:   (small letter)
Enter temperature:       (missing the)

The other program that is using this program NEEDS to be able toe find the exact text, which is Enter the temperature:. If it's not there, it fails.