Commit 21e44729 authored by Tim McNamara's avatar Tim McNamara

Update euclids-algorithm.md

parent 4b56ef53
......@@ -7,11 +7,13 @@ From [Leslie Lamport: Thinking Above the Code](https://www.youtube.com/watch?v=-
> - stop when `x == y`
```python
def gcd(m, n):
def gcd(m: int, n: int):
"""
>>> gcd(12, 18)
6
"""
if int(m) != m or int(n) != n:
raise ValueError("must supply integers")
x, y = m, n
while x != y:
if x > y:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment