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

Function is_prime_b

check_prime.py:21–30  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

19
20
21def is_prime_b(n):
22 if n > 1:
23 if n == 2:
24 return True
25 else:
26 for i in range(2, n):
27 if n % i == 0:
28 return False
29 return True
30 return False
31
32
33def is_prime_c(n):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected