Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You have been provided a starter file that contains Professor Oak s student grades as a list of lists. Each sublist has exactly 6 items,

You have been provided a starter file that contains Professor Oaks student grades as a list of lists. Each
sublist has exactly 6 items, representing the grades for (in order) four assignments, a midterm exam, and
a final exam. All grades are out of 100. Just copy/paste this list to the top of your program. But keep in
mind that your code should work even if we use a different starting list (though with the same format) to
test your program.
From here, you will write three separate functions to perform three tasks, as described below.
Cleaning the Data
Write a function called clean_grades() that takes the list of lists of grades as a parameter. For all of the
student grades, this function should perform two tasks:
Increase the midterm exam grade for ALL students by 2. Recall that the midterm grade is the 5th item
in each sublist.
For any grade greater than 100, set the grade to be just 100(make sure to check for this AFTER
increasing the grade for the midterm exam!)
These changes should be done by modifying the input list itself. No new lists should be created and this
function has no return value.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 11G SQL

Authors: Joan Casteel

2nd Edition

1133947360, 978-1133947363

More Books

Students also viewed these Databases questions