Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bslatkin/effectivepython
/ coprime
Function
coprime
example_code/item_019.py:94–98 ·
view source on GitHub ↗
(a, b)
Source
from the content-addressed store, hash-verified
92
93
print(
"Example 6"
)
94
def
coprime(a, b):
95
for
i in range(2, min(a, b) + 1):
96
if
a % i == 0 and b % i == 0:
97
return
False
98
return
True
99
100
assert coprime(4, 9)
101
assert not coprime(3, 6)
Callers
1
item_019.py
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected