Please advise how I should code this problem
In [ ]: #Run this cell for your imports import pandas as pd import numpy as np In this homework, you will writing two functions that will assign a final letter grade to each student. The scores of each student on each assignment are given in "Final_Grades.csv". In this semester, there 6 homeworks (columns labeled HW_1, .., HW_6), 3 participation scores (column Part_1, Part_2, Part_3) and a midterm and final. Your first task is to write a function callled "Get_Final_Perc" that has the following three inputs: . HW_weight: The weight towards the final grade of the score on all homeworks. Exam_weight: The weight towards the final grade of the midterm and final. You may exam the midterm and final are weighted equally Part_weight: The weight towards the final grade of the score on all participation scores IMPORTANT: For the HW and participation categories, the final percentage is (# points earned)/(# of points possible). So, for example, if there were two HWs and you got 10/10 and 7/8, your final percentage on HW would be 17/18. Inside of this function, you should Read in the data set into a dataframe called df_grades Add to df_grades a column labeled "Final_perc", which gives the final percentage (this should be between 0 and 100 for each student) achieved by each student given the specified weighting scheme that is given as input. Note that it may be helpful to add other columns along the way, this is okay. A few other things that you must keep in mind when writing this function You should only consider students who have a score for all assignments (you can delete the rows corresponding to students with missing scores for any assignment). Hint: Recall that blanks in a csv are automatically read in as NAs. You may assume that for each assignment, there was at least one student who received 100% on the assignment. Furthermore, there was no extra credit on any assignment. Hint: this is how you can figure out the max score on each assignment. In [ ]: def Get_Final_Perc(HW_weight, Exam_weight, Part_weight): df_grades = None # YOUR CODE HERE raise NotImplementedError () return df_grades In [ ]: assert np. isclose(Get_Final_Perc(40, 25, 10). Final_perc. mean(), 88.711) In [ ]: assert np. isclose (Get_Final_Perc(100, 0, @). Final_perc. mean(), 97.426) In [ ]: assert np. isclose (Get_Final_Perc(1, 49.5, 1). Final_perc. mean(), 82.310)