Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

find prime numbers in a given range for big input python

import math
print 2
for num in range(3,101,2):
    if all(num%i!=0 for i in range(3,int(math.sqrt(num))+1, 2)):
        print (num)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #find #prime #numbers #range #big #input #python
ADD COMMENT
Topic
Name
6+2 =