Question: def weighted _ PAs ( ? ) : # you have to determine the signature. [ 5 points ] Description: Design and write a function
def weightedPAs: # you have to determine the signature. points Description: Design and write a function called weightedPAsthat finds the weighted average score of programming assignments for a student. The function accepts a list of integers grades and the number of lowest PAs that need to be dropped drop After dropping the n lowest grades, it computes the average as the sum of grades divided by length of grades drop and returns a float specifying the weighted score. The weight is Parameters: grades list of int where each score inside the grades is between and inclusively drop int This indicates how many lowest scores are dropped. If this parameter is not provided, no grades are dropped. Refer to the examples below to find the order Assumptions: length of grades ; and length of grades drop Return value: A float specifying the weighed score for programming assignments. Note: All floating point output values were rounded to spaces after the decimal point using the round function, rounddata However, do not use these rounded values for your calculations, only round when you return them, otherwise your output will lose precision. Examples: weightedPAs # Drop ; avg weighted weightedPAs # No Drop; avg weighted weightedPAs def weightedexams: # you have to determine the signature points Description: This function takes two midterm exam scores and a final exam score, all of which are integers. If the parameter values for the midterm exams are not provided, the final exam score will be substituted for them. If the final exam score is not provided, its value will be zero. The function returns a list of three floatingpoint values representing the weighted scores of each exam. The weighted scores for midterm exams is and for the final exam is Parameters: Refer to the examples below to find the names of the parameters and their order in the function signature. Return value: A list of three floats that are the weighed scores for each midterm and the final exam, wmt wmt wfe Assumptions: All the exam scores are between to inclusively Examples: weightedexams weightedexams mt weightedexams fe mt def finalGradenames PAs, exams: points Description: This function takes a list of students' names, a tuple containing the list of PA grades and the number of grades to drop, and a list of dictionaries with exam scores for each student. It calculates the final grade for each student and stores it in a dictionary where the keys are the students' names and the values are their final grades. This function MUST be implemented by calling the weightedPAs and weightedexams functions. The final grade is the sum of the weighted exam scores in total and the weighted PAs in total Parameters: names, a list of strings indicating the students' names. PAs, a tuple of lists, where each list contains the list of grades earned for each PA followed by the number of grades that need to be dropped for a student. exams, a list of dictionaries, where each dictionary contains the exam scores each student obtained. The keys of this dictionary are always femt and mt but they may appear in different orders in the dictionary Return value: A dictionary that shows the names of students as keys and their final scores as values. Assumptions: All the PAs gardes are between and and all the exam scores are between to inclusively The lengths of names, PAs, and exams are all equal. Examples: finalGradeJohnfe : mt: mt: John: finalGrade John 'Mason'fe : mt: mt:fe:mt:John: 'Mason': finalGrade Rose 'Tom', 'Paul'fe : mt: mt:Rose: 'Tom': 'Paul':
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
