Question: def get_grades(): pass def average(grades): pass def maximum(grades): pass def minimum(grades): pass def print_grades(grades): pass def main(): grades = get_grades() print_grades(grades) print(Average:, average(grades)) print(Max:, maximum(grades))


def get_grades(): pass
def average(grades): pass
def maximum(grades): pass
def minimum(grades): pass
def print_grades(grades): pass
def main(): grades = get_grades()
print_grades(grades) print("Average:", average(grades)) print("Max:", maximum(grades)) print("Min:", minimum(grades))
if __name__=="__main__": main()
In this assignment you will process some grades for your professor so you can learn how to write loops. You may not use the built-in Python functions to do these operations (except len0 to get list length). Each function should use a for loop to implement the equivalent functionality. Complete the following functions defined in the code below 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 nput: (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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
