#sample solution
grades = [100, 100, 90, 40, 80, 100, 85, 70, 90, 65, 90, 85, 50.5]
def grades_sum(grades):
sum = 0
for grade in grades:
sum = sum + grade
return sum
print grades_sum(grades)
def grade_average(grades):
sum = grades_sum(grades)
average = sum/len(grades)
return average
print grade_average(grades)
No comments:
Post a Comment