I want to run This code But it gives This Error: if n == 0: RecursionError: maximum recursion depth exceeded in comparison
def gcd(n, m):
if n == 0:
return m
else:
return gcd(n, m % n)
print(gcd(10, 50))
Anyone Knows Why ?
n(the first argument); therefore the conditionn == 0will never hold. - hiro protagonist