这样为什么不对呀?
>>> sum = 0
>>> x = 0
>>> while True:
... sum = sum + 2^x
... x = x + 1
... if x > 19:
... break
...
>>> print(sum)
4
>>> sum = 0
>>> x = 0
>>> while True:
... sum = sum + 2^x
... x = x + 1
... if x > 19:
... break
...
>>> print(sum)
4
2016-05-23
举报