Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

prime number in python

import math
a=[i for i in range(2,int(input('prime number range'))) if 0 not in [i%n for n in range(2,int(math.sqrt(i)))]]
print(a)
Source by pypi.org #
 
PREVIOUS NEXT
Tagged: #prime #number #python
ADD COMMENT
Topic
Name
3+1 =