Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/subbarayudu-j/TheAlgorithms-Python
/ is_prime
Function
is_prime
project_euler/problem_10/sol1.py:9–14 ·
view source on GitHub ↗
(n)
Source
from the content-addressed store, hash-verified
7
xrange = range
#Python 3
8
9
def
is_prime(n):
10
for
i in xrange(2, int(sqrt(n))+1):
11
if
n%i == 0:
12
return
False
13
14
return
True
15
16
def
sum_of_primes(n):
17
if
n > 2:
Callers
1
sum_of_primes
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected