Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/subbarayudu-j/TheAlgorithms-Python
/ isprime
Function
isprime
project_euler/problem_03/sol1.py:10–19 ·
view source on GitHub ↗
(no)
Source
from the content-addressed store, hash-verified
8
import
math
9
10
def
isprime(no):
11
if
(no==2):
12
return
True
13
elif
(no%2==0):
14
return
False
15
sq = int(math.sqrt(no))+1
16
for
i in range(3,sq,2):
17
if
(no%i==0):
18
return
False
19
return
True
20
21
maxNumber = 0
22
n=int(input())
Callers
1
sol1.py
File · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected