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 calculate_my_final_grade that will calculate a students final grade
based on their lab assignments, homework, bonus homework, and exams. This function should
take the following inputs:
lab_grades: A list of grades for lab assignments (e.g.,[lab01, lab02,...,
lab13]).
hw_grades: A list of grades for homework assignments (e.g.,[hw1, hw2,...,
hw5]).
bonus_hw_grade: A float representing the bonus homework grade (if applicable).
exams: A list of two grades for the exams: [midterm, final].
Step 1: Modifications to Grades
Before calculating the final grade, apply the following adjustments:
1. 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.
2. Bonus Homework Replacement:
o If there is a bonus_hw_grade, replace the lowest grade in the hw_grades list
with this bonus grade. This adjustment allows you to improve your homework
score if you completed the bonus assignment.
3. Dropping Lowest Lab Grades:
o Drop the three lowest grades in the lab_grades list. This adjustment means that
only the highest 10 lab grades will be considered for calculating your lab grade
average.
Step 2: Calculate the Final Grade
After making the adjustments, calculate the final grade based on the following rubric:
Category Weight
Midterm Exam 20%
Lab Assignments 20%
Homework (~5)30%
Final Exam 30%
print(calculate_my_final_final_grade([100,90,87,110,80,85,90,76,70,95,85,80,85],[100,75,80,85,100],[90.0],[73,80]))

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 Programming Questions!