为什么不能这样?如果这样写是什么意思?
sum = 0
x = 1
n = 1
while True:
if n > 20:
break
n = n + 1
x = 2**(n-1)
sum = sum + x
print sum
sum = 0
x = 1
n = 1
while True:
if n > 20:
break
n = n + 1
x = 2**(n-1)
sum = sum + x
print sum
2018-12-24
举报