MCPcopy Create free account
hub / github.com/geekcomputers/Python / is_prime_a

Function is_prime_a

Prime_number.py:11–18  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

9
10
11def is_prime_a(n):
12 if n < 2:
13 return False
14 sqrt_n = int(sqrt(n))
15 for i in range(2, sqrt_n + 1):
16 if n % i == 0:
17 return False
18 return True
19
20
21def is_prime_b(n):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected