课程
/后端开发
/Python
/初识Python
sum = 0 x = 1 L=[] while x>100: L.insert (-1,'X') X=X+2 for sum in L : print sum
这样为什么显示运行成功然后下面一片空白
2019-11-11
源自:初识Python 5-5
正在回答
x<=100啊,》100就不运行啊
花鹘 提问者
sum = 0
x = 1
while x < 100:
sum += x
x += 2
print sum
L=[]
a = 0
while x<100:
L.insert (-1,x)
x=x+2
for a in L :
sum += a
print (sum)
if x%2 == 1:
x = x + 1
举报
学python入门视频教程,让你快速入门并能编写简单的Python程序