Grading of programming assignments is based upon three criteria: correctness, technique, and readability.
Correctness is by far the most important criterion. A program which does not correctly fulfill the requirements of the assignment is subject to a grade reduction of as much as 50% or more.
The technique used in a program is the means in which that particular problem was solved. A solution which is correct but clumsy or awkward is subject to a grade reduction of as much as 25%. Sometimes there will be very little leeway in this area; other times there might be several correct solutions.
The readability of a program refers to the ease with which a human reader (such as the grader!) can read and understand the source code. The readability does not affect the execution of the program; however, poor readability can result in programming errors which make the program incorrect. Poor readability can also result in a grade reduction of as much as 25%. The readability of a program includes: