为什么不能用这种代码
>>> sum=0
>>> x=1
>>> n=1
>>> while n<=20:
... sum=sum+x
... x=x*2
... n=n+1
... print sum
>>> sum=0
>>> x=1
>>> n=1
>>> while n<=20:
... sum=sum+x
... x=x*2
... n=n+1
... print sum
2019-04-09
举报