Question: Write a function calculate _ my _ final _ grade that will calculate a student s final grade based on their lab assignments, homework, bonus
Write a function calculatemyfinalgrade that will calculate a students final grade
based on their lab assignments, homework, bonus homework, and exams. This function should
take the following inputs:
labgrades: A list of grades for lab assignments eglab lab
lab
hwgrades: A list of grades for homework assignments eghw hw
hw
bonushwgrade: A float representing the bonus homework grade if applicable
exams: A list of two grades for the exams: midterm final
Step : Modifications to Grades
Before calculating the final grade, apply the following adjustments:
Midterm Adjustment:
o If the final exam grade is higher than the midterm grade, set the midterm grade
to be equal to the final exam grade. This adjustment means that if you perform
better on the final, your midterm grade will be boosted to match it
o If the final exam grade is not higher than the midterm grade, keep the original
midterm grade.
Bonus Homework Replacement:
o If there is a bonushwgrade, replace the lowest grade in the hwgrades list
with this bonus grade. This adjustment allows you to improve your homework
score if you completed the bonus assignment.
Dropping Lowest Lab Grades:
o Drop the three lowest grades in the labgrades list. This adjustment means that
only the highest lab grades will be considered for calculating your lab grade
average.
Step : Calculate the Final Grade
After making the adjustments, calculate the final grade based on the following rubric:
Category Weight
Midterm Exam
Lab Assignments
Homework ~
Final Exam
printcalculatemyfinalfinalgrade
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
