HW 11 Grading Guide
All the questions should use recursive solutions and should not
use either side-effects (i.e., set!) or iteration. Deduct the
bulk of the points for using either construct. Do not waste time
looking through the student's code trying to understand it. If I ask
you to look for something, such as the delay and force
constructs in problem 7 or tail recursion in problem 3, then scan the
student's solution and make sure it's there. Otherwise just come up
with sample data for the indicated test cases and run their code
against it.
- (15 points): It may be easier to eyeball this one rather
than running it, because it's a one line function. Use your
judgment in assigning partial credit
- (15 points): I don't care whether or not the function
is tail-recursive.
- Deduct 1 point for not converting the result
to a floating point number.
- Deduct 2 points for not returning a reasonable value,
e.g., 0, for an empty list
- Make sure that a single element list works properly
(deduct 2 points for not working properly)
- Use your judgment in awarding partial credit
- (15 points)
- Verify that the solution works on empty lists (the return
value should be an empty list), one
element lists, and arbitrary length lists (-2 points each for
not working with empty lists and one element lists)
- Scan the solution and make sure that
it really uses tail recursion. Deduct the full 15 points for
not using tail recursion.
- Use your judgment in awarding partial credit
- (15 points): Things to check
- empty list
- single element list
- multi-element list
- (15 points): Don't waste time trying
to figure out if it does not work properly. Things to check:
- empty lists
- one element lists
- arbitrary length lists
- lists in which none of the elements passes the filter
- lists in which all the elements pass the filter
Each case should be 3 points but use your judgment.
- (15 points): Do not try to decipher the code. Check
the following cases:
- (1 point) Empty tree (i.e., empty list)
- (2 points) Tree with single node (i.e., one element list)
- Trees that contain a subtree with a single child
- Trees that contain a subtree with an arbitrary number
of children
- Have at least a couple cases where the two trees have
the same set of leaves, but different structures
The last three cases are 12 points. Use your judgment in
awarding partial credit. Deduct the full 15 points for not using
map and reduce/fold.
- (10 points): Make sure that they create two parts and that they
use the delay and force constructs. Then run their printFib function and
verify that it generates the first n fibonacci numbers correctly, where n
is some number that you choose.