diff options
Diffstat (limited to 'tdd/math_utils/gcd.py')
-rw-r--r-- | tdd/math_utils/gcd.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/tdd/math_utils/gcd.py b/tdd/math_utils/gcd.py deleted file mode 100644 index 7204ac0..0000000 --- a/tdd/math_utils/gcd.py +++ /dev/null @@ -1,22 +0,0 @@ -def gcd(a, b): - """Returns the Greatest Common Divisor of the two integers - passed as arguments. - - Args: - a: an integer - b: another integer - - Returns: Greatest Common Divisor of a and b - - >>> gcd(48, 64) - 16 - >>> gcd(44, 19) - 1 - """ - if b == 0: - return b - return gcd(b, a%b) - -if __name__ == "__main__": - import doctest - doctest.testmod() |