OnePage Python Tutorial
Wednesday, October 5, 2016
Python a cute GCD program with parallel assignment
def gcd (m,n):
while m % n != 0:
m,n = n, m%n
return n
print gcd(4, 7)
print gcd(12, 15)
Home
Subscribe to:
Comments (Atom)