请问为什么不能用else
#把else改成if就通过了,为什么?
sum = 0
x = 0
while True:
x = x + 1
if x > 100:
break
else x%2==0:
continue
sum=sum+x
print sum
#把else改成if就通过了,为什么?
sum = 0
x = 0
while True:
x = x + 1
if x > 100:
break
else x%2==0:
continue
sum=sum+x
print sum
2016-07-09
举报