课后练习问题
def square_of_sum(L):
for num in L:
return sum(num*num)
print square_of_sum([1, 2, 3, 4, 5])
print square_of_sum([-5, 0, 5, 15, 25])
为什么不对啊??
def square_of_sum(L):
for num in L:
return sum(num*num)
print square_of_sum([1, 2, 3, 4, 5])
print square_of_sum([-5, 0, 5, 15, 25])
为什么不对啊??
2017-09-03
举报