sum = 0
x = 0
while True:
x = x + 1
if x % 2 == 0:
continue
if x > 100:
break
sum = sum + x
print sum
慕工程8309199
浏览 1440回答 1
1回答
孤独的小猪
if x % 2 ==0 后面的冒号是中文的,改成英文的就可以正确运行了。# -*- coding:utf-8 -*-
sum = 0
x = 0
while True:
x = x + 1
if x % 2 == 0:
continue
if x > 100:
break
sum = sum + x
print sum