Discuss / Python / 大神帮帮忙

大神帮帮忙

Topic source

大笑肖肖

#1 Created at ... [Delete] [Delete and Lock User]

n=1

while n<101:

if n==10:

  continue

print(n)

n=n+1

print('end')

我这个为什么执行到9   就没有输入内容了

哲学术士

#2 Created at ... [Delete] [Delete and Lock User]

执行到9后,n++,n=10,n会不断的执行

if n==10:

  continue

而忽略下面的n++操作,

也就是死循环!

大笑肖肖

#3 Created at ... [Delete] [Delete and Lock User]

懂了  谢谢


  • 1

Reply