Letter grades are a reasonable way of assigning marks to student work, but a poor way of representing calculated marks, unless you're prepared to be very careful.
The grading programs use this scale to convert between numerical and letter grades:
grade min max value ----- --- --- ----- A+ 90 100 95 A 85 90 87.5 A- 80 85 82.5 B+ 77 80 78.5 B 73 77 75 B- 70 73 71.5 C+ 67 70 68.5 C 63 67 65 C- 60 63 61.5 D+ 57 60 58.5 D 53 57 55 D- 50 53 51.5 E 35 50 42.5 F 0 35 17.5
This is the standard University of Toronto scheme, except that the grade of E no longer officially exists. Most instructors like to retain the distinction between a bad mark and a very bad mark, however, so we continue to use the E grade.
Suppose, for example, that you give a student a grade of C on an essay worth 15% of the final course grade. The "value" column of the table gives 65 as the value of a C when the maximum mark is 100, so if the maximum is 15, then a C is worth 0.15 * 65, or 9.75. The student has 9.75 out of 15.
Generalizing, each letter's maximum mark is the minimum for the next higher letter. More exactly, each letter grade represents marks in the range min <= mark < max.
The "value" in the last column is the middle of the min...max range. When a mark is recorded by a letter grade, the value used for further calculations is what is given in the "value" column.
Suppose now that we have calculated that a student's term mark is 45 out of 60. It is straightforward to determine that 45 out of 60 is 75 out of 100, so that the term mark is B. Thus, you may specify that you want the term mark to be represented as a letter grade by giving this mark definition with the output format 'A':
term = a1 : 10 proj : 25 test : 25 ! Aand indeed the grading programs will store a letter of B for this student.
A more common use for letter grades is with final marks. To show students what part of the letter-grade scale they're in, you might calculate a numerical final grade and an equivalent letter grade:
finl = term : 60 exam : 40 $add(5) flet = finl : 100 ! AThis too will do what you expect.
finl = term : 60 exam : 80 $add(5)Now a student with 50 (out of 60) on the term and 50 (out of 100) on the exam will get a final mark of 50 + 40 = 90 on the course. You will report this mark, and the student has an A+ as far as you, the student and the Faculty are concerned.
The grading programs disagree. The student has 90 out of 140 in its opinion, or about 64.3%, so the "flet" mark will be calculated as C.
Another fruitful source of horrible examples is the $mul function, which changes the value of marks but not their total weight. Consider this:
finl = term : 50 $mul(2) flet = finl : 50 ! ANow if you get a mark of 30 on the term work, you get a final grade of 60, or A+. A+?! Yes, because finl and flet are both "out of" 50, since the multiplicative adjustment doesn't change the "highest" mark. Thus, your 60 is out of 50.
You can't fix this by changing flet to be out of 100, because it will now be 120 out of 100, and still A+.
To alert you to these kinds of problems, the grading programs warn you if you have a calculated letter grade that is out of something other than 100. Here's an example of the kind of warning you get:
Error 115: "m3" is a calculated letter grade with a dangerous maximum markThere may be cases where you can neglect these warnings because you know what you're doing, but the warning isn't going to go away.
Presumably, a calculated letter grade is safe if it represents a final course grade that is supposed to be out of 100, and if the formula giving the calculated letter grade has a total weight of 100.
The table-driven process described for raw-data letter grades works in reverse for calculated letter grades. Thus, a grade of 67.8 (out of 100) lies in the range 67 <= mark < 70, and is converted to C+.
The trouble is that the same thing happens with 69.9. In numerical format, that would be printed as 70, but in letter-grade format it would be converted to C+. In order to display your final marks correctly converted to letter grades, you need to round them first to the nearest integer:
finl = term : 60 exam : 40 flet = finl : 100 $round(1) ! AIn this example, the $round(1) rounds the mark to the nearest multiple of 1, and then the formatting specification "! A" causes it to be represented as a letter grade when gen prints it.
This seems clumsy -- why should you have to change the value of the mark before figuring out the letter-grade equivalent? -- but it preserves the view of letter grades as representing a range of mark values without tying them to a particular maximum mark.
(And considering that the older version of the grading programs refused to allow calculated letter grades, we're actually living on the edge here.)