为什么line7 报错 float division by zero?
def average(*args):
sum = 0.
n = 0
if args == 0:
return sum
for num in args:
sum += num
n += 1
return sum/n
print average()
print average(1, 2)
print average(1, 2, 2, 3, 4)