课程
/后端开发
/Python
/初识Python
sum = 0x = 1n=0while x<100: sum+=x
if x%2==0: pass x+=1print sum
2018-04-22
源自:初识Python 5-5
正在回答
#求100以内奇数的和 sum = 0 x = 0 while x<100: x+=1 if x%2==0: continue else: sum+=x print (sum)
weibo_骑着小钻风上高架_0 提问者
sum = 0x = 1n=0while x<100:
if x%2==0: continue
sum+=x
x+=1print sum
慕盖茨4046381
你是要求100以内的奇数吗
把pass改成continue
举报
学python入门视频教程,让你快速入门并能编写简单的Python程序