求教:结果为什么是50:1250
def square_of_sum(L):
sum = 0
for x in L:
sum = x * x
sum = sum + sum
return sum
print square_of_sum([1, 2, 3, 4, 5])
print square_of_sum([-5, 0, 5, 15, 25])
def square_of_sum(L):
sum = 0
for x in L:
sum = x * x
sum = sum + sum
return sum
print square_of_sum([1, 2, 3, 4, 5])
print square_of_sum([-5, 0, 5, 15, 25])
2018-10-27
举报