a, b: positive integers returns: a positive integer, the greatest common divisor of a & b.
def gcdIter(a, b):
if a < b:
gcd = a
else:
gcd = b
while gcd > 0:
if a % gcd != 0 and b % gcd != 0:
gcd -= 1
else:
return gcd
print(gcdIter(9, 12))