5. Computing the average


#1

I am using the function below to compute the grades average but can't for the life of me figure out why am I getting an error. Can someone help me please?

def grades_average(grades):
    sums = grades_sum(grades)
    G_average = sums / float(len(grades))
    return G_average
    print grades_average(grades)

I get the error: "Oops, try again. You did not print the correct average. Double-check your code and make sure you print the average!"


#2

HI you don't need to indent this line (remove the sapce before it )

    print grades_average(grades)

#3

Thank you wizmarco, that was it :slight_smile:


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.