while 循环

 1 count = 0
 2 while True:
 3     print("hello world",count)
 4     count +=1
 5     if count == 100:
 6         print("已暂停")
 7         break
 8 -------------------------------------------------
 9 打印100个数字50-60之间不打印
10 count = 0
11 while True:
12     count += 1
13     if count > 50 and count <60:
14         continue
15     print("hello world",count)
16     if count == 100:
17         print("已暂停")
18         break

 

posted @ 2016-10-12 17:11  Callum  阅读(168)  评论(0编辑  收藏  举报