Exercise 2: Grading, Revisited
a. Check that the second version of
compute-grade computes a grade using
the strategy specified in the narrative. (That is, that it drops the
lowest grade and doubles the highest grade.) You might, for example,
use grades of 0, 50, 50, 50, 50, and 80.
b. Write a new version of compute-grade that drops both
the lowest and highest grade.
c. Does this new version correspond to the documentation given in the
reading? Why or why not?
d. Suppose someone wrote a new version of compute-grade that
returns the average of the homework assignments, with an additional one
point of extra credit for each assignment over 80. Would this version
correspond to the documentation? Why or why not?