顺序不同数值不同,求解
sum = 0
x = 1
while x < 100:
sum = sum + x
x = x +1
print sum
sum = 1
x = 0
while x < 100:
x = x +1
sum = sum + x
print sum #这是什么原因造成数值变化的
sum = 0
x = 1
while x < 100:
sum = sum + x
x = x +1
print sum
sum = 1
x = 0
while x < 100:
x = x +1
sum = sum + x
print sum #这是什么原因造成数值变化的
2018-05-04
举报