MCPcopy Create free account
hub / github.com/BloombergGraphics/whatiscode / gcd

Function gcd

research/sample/euclid.py:5–7  ·  view source on GitHub ↗
(u, v)

Source from the content-addressed store, hash-verified

3# magazine.
4
5def gcd(u, v):
6 return gcd(v, u % v) if v \
7 else abs(u)
8
9print gcd(16,12)
10# expecting 4

Callers 1

euclid.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected