码迷,mamicode.com
首页 > 其他好文 > 详细

9-16

时间:2014-09-16 20:33:50      阅读:236      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   io   os   ar   for   div   

http://www.oschina.net/question/12_44528

 

http://forum.ubuntu.org.cn/viewtopic.php?f=86&t=367125

 

http://blog.chinaunix.net/uid-23960482-id-111808.html

 

http://www.ruanyifeng.com/blog/2013/08/linux_boot_process.html

 

#!/usr/bin/python

for num in range(10,20):  #to iterate between 10 to 20
   for i in range(2,num): #to iterate on the factors of the number
      if num%i == 0:      #to determine the first factor
         j=num/i          #to calculate the second factor
         print %d equals %d * %d % (num,i,j)
         break #to move to the next number, the #first FOR
   else:                  # else part of the loop
      print num, is a prime number

 

9-16

标签:style   blog   http   color   io   os   ar   for   div   

原文地址:http://www.cnblogs.com/zxpgo/p/3975715.html

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