Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/subbarayudu-j/TheAlgorithms-Python
/ gcd
Function
gcd
maths/greater_common_divisor.py:2–3 ·
view source on GitHub ↗
(a, b)
Source
from the content-addressed store, hash-verified
1
# Greater Common Divisor - https://en.wikipedia.org/wiki/Greatest_common_divisor
2
def
gcd(a, b):
3
return
b
if
a == 0
else
gcd(b % a, a)
4
5
def
main():
6
try
:
Callers
1
main
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected