首页 > 代码库 > 9-16

9-16

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/pythonfor 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