为什么用while循环错误呢
def square_of_sum(L):
sum=0
while x in L:
sum+=x*x
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
while x in L:
sum+=x*x
return sum
print square_of_sum([1, 2, 3, 4, 5])
print square_of_sum([-5, 0, 5, 15, 25])
2018-07-18
举报