Grading with partial score
Sometimes a problem does not need to be solved perfectly. The user may have too little time to think about every possible test case, the problem may be so hard that even passing some tests is quite an achievement, or sometimes one does not want to discourage users by showing them just a plain "wrong answer" message. In all of these cases, a partial score judge may be used. The author is still able to verify the programmer's skills, but now he or she may do it more precisely: having two users with "wrong answer" says less than having one with a score of 50% and one with a score of 75%.
Sample challenge
In this particular problem, the user has to check whether a given number x (0 ≤ x ≤ 106) is prime or not and print the answer accordingly.
Example
input
5
output
YES
input
6
output
NO
Sample solutions
function foo(items) {
var x = "All this is syntax highlighted";
return x;
}