为什么我这个代码的第一个输出是None,而不是0.0
def average(*args):
for x in args:
sum = 0.0
if len(args)==0:
return sum
else:
sum = sum + x
return sum / len(args)
def average(*args):
for x in args:
sum = 0.0
if len(args)==0:
return sum
else:
sum = sum + x
return sum / len(args)
2019-07-13
举报