fork download
  1.  
  2. def czy_pierwsza(n):
  3. d = 2
  4. while d * d <= n:
  5. if n % d == 0:
  6. return False
  7. d += 1
  8. return True
  9. print(czy_pierwsza(11))
  10. print(czy_pierwsza(99))
Success #stdin #stdout 0.03s 9600KB
stdin
Standard input is empty
stdout
True
False