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

Function is_prime_b

Prime_number.py:21–29  ·  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 return False
24 if n == 2:
25 return True
26 for i in range(2, int(n // 2) + 1):
27 if n % i == 0:
28 return False
29 return True
30
31
32def is_prime_c(n):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected