Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

is prime python

import math
def isPrimeNumber(n):
    if (n < 2):
        return False;
    sq = int(math.sqrt(n))
    for i in range(2, sq + 1):
        if (n % i == 0):
            return False
    return True
 
PREVIOUS NEXT
Tagged: #prime #python
ADD COMMENT
Topic
Name
6+1 =