HW 10 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.

  1. (6 points)

  2. (10 points) I don't care whether or not the function is tail-recursive.

    1. Deduct 1 point for not converting the result to a floating point number.
    2. Deduct 1 point for not returning a reasonable value, e.g., 0, for an empty list
    3. Make sure that a single element list works properly (deduct 1 point for not working properly)
    4. Use your judgment in awarding partial credit

  3. (10 points)
    1. Verify that the solution works on empty lists, one element lists, and arbitrary length lists (-1 point each for not working with empty lists and one element lists)
    2. Scan the solution and make sure that it really uses tail recursion. Deduct the full 10 points for not using tail recursion.
    3. Use your judgment in awarding partial credit

  4. (15 points): Things to check
    1. empty list
    2. single element list
    3. multi-element list

  5. (15 points): Things to check:

    1. empty lists
    2. one element lists
    3. arbitrary length lists
    4. lists in which none of the elements passes the filter
    5. lists in which all the elements pass the filter

  6. (15 points): Use your judgment in awarding partial credit for all three parts.
    1. (7 points)
    2. (4 points)
    3. (4 points)

  7. (15 points): Check the following cases:

    1. (1 point) Empty tree (i.e., empty list)
    2. (2 points) Tree with single node (i.e., one element list)
    3. Trees that contain a subtree with a single child
    4. Trees that contain a subtree with an arbitrary number of children
    5. 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.

  8. (14 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.