课程
/后端开发
/Python
/初识Python
大神们,问题出现在了哪里?我输出print(sum)也不对
2018-07-16
源自:初识Python 5-7
正在回答
缩进不对,改成我这样就行了。我试过了。
sum = 0x = 0while True: x = x + 1 if x > 100: break if x%2==1: sum+=x continueprint sum
sum = 0x = 0while True:x = x + 1if x > 100: breakif x%2==0:
continue
else
sum+=xprint sum
qq_情殇之羽_0
sum = 0x = 0while True:x = x + 1if x > 100: breakif x%2==1: sum+=xcontinueprint sum
举报
学python入门视频教程,让你快速入门并能编写简单的Python程序