Question: for Question 3 : Assignment Grades On Assignment 0 1 , we worked with the course marking scheme. In this question, we'll focus on the

for Question 3: Assignment Grades
On Assignment 01, we worked with the course marking scheme. In this question, we'll focus on the computation of a grade for the assignment portion of a course.
Let's assume that a course has some number of assignments, each marked individually with a number from 0 to 100(inclusive), all recorded in a list of numbers. Let n represent the length of that list (i.e., the number of assignments). The goal is to produce a single "assignment mark", also between 0 and 100, to which all individual assignments contribute an amount weighted by 100n .
In the simplest case, we might imagine dividing each individual grade by n and adding up the results (which happens to be equivalent to taking the average of the numbers in the list). But life isn't that simple, for a couple of reasons:
We drop a student's lowest assignment grade. That is, we calculate the grade based only on the assignments that remain after the lowest number in the list has been removed from consideration. (We always drop a single assignment, even if multiple assignments are tied for the lowest grade.)
It's possible to be "excused" from one or more assignments, for example because of illness. We'll record any excused assignments by placing a symbol 'x in the list of assignment grades, and skip over them when calculating the grade. (Also, we will drop the lowest numeric grade above, after excused assignments have been removed from consideration.)
Write a function assignment-grade that consumes a list whose elements are a mix of numbers between 0 and 100(inclusive) and the symbol 'x. The function should produce a number between 0 and 100, giving the aggregate assignment grade based on the non-excused assignments with the lowest grade dropped. You can assume that the list contains at least two numeric grades, so that the result can be computed without dividing by zero. For ;; Drop the 30, compute grade based on 80,90.5, and 75.5
>(assignment-grade (cons 80(cons 30(cons 90.5(cons 75.5 empty)))))
82
;; Drop one of the 80s, compute grade based on the other 80 and 90
>(assignment-grade (cons 'x (cons 80(cons 'x (cons 90(cons 80(cons 'x empty)))))))
85example:for dr racket Fo

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!