> For the complete documentation index, see [llms.txt](https://xmc.gitbook.io/xmc-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xmc.gitbook.io/xmc-documentation/overview/graders.md).

# Graders

A grader is a program that gives a score to a user's submission based on its output. It reads the user's program-generated output and the test's input and returns a score based on the grader's programming.

## Programming a grader

The grader program is executed with three arguments:

1. The name of the input file
2. The name of the output file
3. The name of the ok file (optional)

After the grading process is finished, the grader must return a score between `0` and `1` with two-decimals precision by writing to `stdout`, and a message to `stderr`. Examples of valid scores are `1`, `0`, and `0.15`.

In case of error, the grader must exit with exit code 1.
