SyntaxFix
Write A Post
Hire A Developer
Questions
def avg(l): """uses floating-point division.""" return sum(l) / float(len(l))
l1 = [3,5,14,2,5,36,4,3] l2 = [0,0,0] print(avg(l1)) # 9.0 print(avg(l2)) # 0.0