大神求解啊 我这样编的 结果不对 但是我局的看起来没问题啊 头皮裂了想不通
def square_of_sum(L):
for x in L:
sum = 0
sum = sum + x**2
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):
for x in L:
sum = 0
sum = sum + x**2
return sum
print square_of_sum([1, 2, 3, 4, 5])
print square_of_sum([-5, 0, 5, 15, 25])
2020-03-05
举报