I study computer science. In my course problems are in a web page and there are described what the program should do and what the screen should be seen after an example run. The solutions are checked by computer and the grader outputs the differences between my output and the expected output.

Now I have done exercise and by example the run, it gives the correct answer. The automatic checker shows that my code has a mistake. What should I do in a situation that in my opinion, the example run goes well and the program satisfies the needs the description tells but automatic grader shows a mistake of the form like there is an extra space or tab or newline somewhere? Note that in the assignment there was not specified such a thing. Is the case that I have found another solution to the problem, or am I expected to modify the code until the automatic grader shows no mistake, or should I ask the lecturer to manually check my solution, or ask the lecturer more detailed assignment? The source code of the automatic checker is not available for me.

  • 4
    $\begingroup$ Talk to you teacher, but be open to the idea that you are wrong. If you are not wrong, then politely help the teacher to be more clear. $\endgroup$ Oct 8, 2022 at 10:15
  • $\begingroup$ You say that the grader indicates a mistake. Does it give a different result? $\endgroup$
    – Buffy
    Oct 12, 2022 at 15:49

1 Answer 1


No, it won't (or shouldn't) be something like spacing and such.

My best guess is that you have done inadequate testing of the code and that for some inputs, say, it gives the wrong answer.

I don't know the internals of the auto-grader though, and it is possible that it has an error or is using an incorrect rubric. This might be possible for an insufficiently tested grader, just as you might have an error for insufficiently tested code.

If the grader was created by an instructor, then they might also be incorporating a style guide into the rubric. In that case it could actually be spacing or line breaks or indentation or anything that annoys the grader. But the same would be the case for a human grader.

Yes, if you can't identify the error or why it indicates an error, talk to the instructor.

You don't indicate what your level of learning is, but assuming you are a raw novice at it, perhaps the issue is that you were guided too much by the sample input and output and not enough by the problem description. That is pretty common for beginners. I remember first learning to program (deep in the previous century: FORTRN IV, self taught) and making such errors.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.