一直报错,谁帮忙看看
def average(*args): sum=0.0 n=len(args) if n==0: return sum for x in args: sum = sum+x return sum/n print average() print average(1, 2) print average(1, 2, 2, 3, 4)为何一直报错
def average(*args): sum=0.0 n=len(args) if n==0: return sum for x in args: sum = sum+x return sum/n print average() print average(1, 2) print average(1, 2, 2, 3, 4)为何一直报错
2016-04-26
举报