day1/exercise/gcd.py
author Prabhu Ramachandran <prabhu@aero.iitb.ac.in>
Sun, 20 Jun 2010 18:23:34 -0400
branchscipy2010
changeset 410 ec4b97af33e1
parent 64 333092b68926
child 428 ee689f7c3122
permissions -rw-r--r--
Updating session4, adding example for computation of norm and SVD.

def gcd(a, b):
  if a % b == 0:
    return b
  return gcd(b, a%b)

print gcd(5, 40)
print gcd(11, 60)