新手求解!
print sum
sum = 0
x = 1
n = 1
while True:
if n > 20:
break
sum = sum + x
x = x*2
n = n + 1
print sum
sum = 0
x = 1
n = 1
while True :
sum = sum + x
x = x * 2
n = n + 1
if n > 20:
break
print sum
两个代码区别在什么地方?为什么都运行不出来?
print sum
sum = 0
x = 1
n = 1
while True:
if n > 20:
break
sum = sum + x
x = x*2
n = n + 1
print sum
sum = 0
x = 1
n = 1
while True :
sum = sum + x
x = x * 2
n = n + 1
if n > 20:
break
print sum
两个代码区别在什么地方?为什么都运行不出来?
2018-07-11
举报