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