这段代码错在哪了?运行不出来,求指教!
def average(*args): s=0.0 for x in args: s=s+x a=s/len(args) return a print average() print average(1, 2) print average(1, 2, 2, 3, 4)
def average(*args): s=0.0 for x in args: s=s+x a=s/len(args) return a print average() print average(1, 2) print average(1, 2, 2, 3, 4)
2018-02-08
举报