I got the correct answer for the question, but I have a question about the following line:

avg = grades_sum(grades)/float(len(grades))

Why can't we just use (len(grades)), especially when the number of elements is a whole number? Is there a rule that you can't perform operations between a decimal value (the sum of grades) and whole numbers?