fork download
  1.  
  2. for num in range(10,20): #to iterate between 10 to 20
  3. for i in range(2,num): #to iterate on the factors of the number
  4. if num%i == 0: #to determine the first factor
  5. j=num/i #to calculate the second factor
  6. print '%d equals %d * %d' % (num,i,j)
  7. break #to move to the next number, the #first FOR
  8. else: # else part of the loop
  9. print num, 'is a prime number'# your code goes here
Success #stdin #stdout 0s 23304KB
stdin
Standard input is empty
stdout
10 equals 2 * 5
11 is a prime number
12 equals 2 * 6
13 is a prime number
14 equals 2 * 7
15 equals 3 * 5
16 equals 2 * 8
17 is a prime number
18 equals 2 * 9
19 is a prime number