def primetest(x): if x < 2: return False d = 2 while d < x: if x % d == 0: return False d += 1 return True