Question: 1. Calculating your assignment grade. Write a Python function assignment_mark that consumes a list of assignment grades (called grades), and returns a floating point value

 1. Calculating your assignment grade. Write a Python function assignment_mark that

1. Calculating your assignment grade. Write a Python function assignment_mark that consumes a list of assignment grades (called grades), and returns a floating point value between 0.0 and 100.0, inclusive, for the overal assignment mark. Individual assignment grades are either an integer value between 0 and 100, inclusive, or the string 'x' In calculating the assignment grade, note the following: The 'x entries are ignored, as this indicates that the student was ill and the assignment is not to be considered when calculating the assignment mark. The final assignment is worth double, so treat it as two assignment grades in calculations. A student cannot be excused from the last assignment, so the last entry in the list will never be 'x' The lowest assignment grade (not counting the last assignment or 'x' grades) is dropped. In the case of ties, just one of these is dropped. While we will have 9 assignments this term, grades may be longer. You can assume that there will be at least three non-excluded assignments, including the last one o Do not import any modules other than math and check o Do not use Python constructs from later modules (e.g. loops). Do not use any other Python . functions not discussed in class or explicitly allowed elsewhere. See the allowable functions post on Piazza. You are always allowed to define your own helper functions, as long as they meet the assignment restrictions. . Do not perform any rounding on the calculated assignment grade, but remember to use check.within for your testing The function will return the average of all assignments, other than the excluded and minimum grade while counting the final assignment as two assignments. The list grades is not changed by the function. For example, assignment_mark 100, 82, 'x', 75, 45, 'x', 80])-83.4 The returned value is the average of 100, 82, 75, 80, 80, as 45 is dropped as the lowest grade, values are ignored, and the final assignment is counted as two assignments

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!