有何不同之处?求解答
‘sum = 0
x = 1
while x < 100:
sum = sum + x
x = x + 2
print sum
与‘sum = 0
x = 1
while x < 100:
x=x+2
sum = sum + x
print sum
为何运算结果不同
‘sum = 0
x = 1
while x < 100:
sum = sum + x
x = x + 2
print sum
与‘sum = 0
x = 1
while x < 100:
x=x+2
sum = sum + x
print sum
为何运算结果不同
2017-04-03
举报