Question: I could really use help on the get_grades() function. I need to get the following output at the end. In python please! thanks! get grades0
I could really use help on the get_grades() function. I need to get the following output at the end. In python please! thanks!



get grades0 should ask the user how many grades they want to input, then put that many values into the list grades average0 should return the average of all the values in grades list. If grades is empty, average should be zero maximum0 should return the maximum grade in grades list. If grades is empty, maximum should be zero minimum0 should return the minimum grade in grades list. If grades is empty, minimum should be zero print grades0 should print the grades each on a separate line. It should not print in list format Example main output: Input: (grades can be integers like 85 or floats like 85.2) 45.0 83 92.5 67 51.2 Output How many grades: Enter grade: Enter grade: Enter grade: Enter grade: Enter grade: 45.0 83.0 92.5 67.0 51.2 Average: 67.74 Max: 92.5 Min: 45.0 Note: DO NOT USE WHILE LOOPS OR BUILT IN LIST FUNCTIONS (except len) and append main.py 1 def average(grades): total 0 for grade in grades: 4 total +-grade return total / len (grades) pass 7 8 9 def maximum(grades): result-grades for grade in grades: 0] if grade result: result grade 12 return result pass 16 17 18 def minimum(grades): 19 ult - grades[0] 20 21 result-grades for grade in grades: if grade
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
