Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 : Assignment Grades
On Assignment 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 to inclusive all recorded in a list of numbers. Let n represent the length of that list ie the number of assignments The goal is to produce a single "assignment mark", also between and to which all individual assignments contribute an amount weighted by n
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 assignmentgrade that consumes a list whose elements are a mix of numbers between and inclusive and the symbol x The function should produce a number between and giving the aggregate assignment grade based on the nonexcused 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 compute grade based on and
assignmentgrade cons cons cons cons empty
;; Drop one of the s compute grade based on the other and
assignmentgrade cons x cons cons x cons cons cons x empty
example:FOR DR RACKET Fo
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started