All pastes #47203 Raw Edit

Untitled

public text v1 · immutable
#47203 ·published 2006-03-27 21:02 UTC
rendered paste body
#!/usr/bin/env python
import sys
def testPrime(x):
        if x == 1:
                print x
                x = x + 1
        y = x - 1
        while y != 1:
                if x%y != 0:
                        if y%2 == 0:
                                if y == 2:
                                        print x
                if x%y == 0:
                        break
                y = y - 1
startNum = int(raw_input("Starting position? "))
endNum = int(raw_input("Ending position? "))
for x in range(startNum, endNum):
        testPrime(x)