麻烦大家帮我看一下哪里错了
def average(*args):#在函数内部,args被视为一个tuple
if len(args)>0:
sum=0
for x in args:
sum=sum+x
y=sum*1.0/len(args)
return y
else:
return 0.0
def average(*args):#在函数内部,args被视为一个tuple
if len(args)>0:
sum=0
for x in args:
sum=sum+x
y=sum*1.0/len(args)
return y
else:
return 0.0
2017-08-10
举报