First off, nice work ensuring we don't divide by zero here! However, since (a) we can assume sum == 0 if n == 0 and (b) we don't want to divide sum by 0 regardless of whether or not sum is in fact zero, we can forgo checking if sum == 0 here and just check if n == 0.
CodeAcademyPythonIntensive/TomeRater.py
Line 71 in 4bc35a9
First off, nice work ensuring we don't divide by zero here! However, since (a) we can assume sum == 0 if n == 0 and (b) we don't want to divide sum by 0 regardless of whether or not sum is in fact zero, we can forgo checking if sum == 0 here and just check if n == 0.