码迷,mamicode.com
首页 > 编程语言 > 详细

python 一个小程序开启博客之旅:

时间:2015-11-01 06:50:00      阅读:231      评论:0      收藏:0      [点我收藏+]

标签:

 

#_*_ coding:utf-8 _*_

print_num = input (‘which loop do you want it to be printed out?‘)

count = 0

while count < 100000:

  if count == print_num:   

     print ‘there you got the number:‘, count   

     choice = raw_input (‘Do you want to continue the loop?(y/n)‘)  

    if choice == ‘n‘:      

       break   

    else:      

      while print_num <= count:            

      print_num = input (‘which loop do you want it to be printed out?‘)          

      print ‘this number has passed‘

  else:     

    print ‘loop:‘, count  

  count +=1

else:     

print ‘loop:‘, count

python 一个小程序开启博客之旅:

标签:

原文地址:http://www.cnblogs.com/crazyforever/p/4926623.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!