summaryrefslogtreecommitdiff
path: root/testing_and_debugging/gcd.py
blob: b8d129653ec71411e834d011b5433667b6186fe7 (plain)
1
2
3
4
5
6
7
8
9
10
def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a%b)

if __name__ == '__main__':
    result = gcd(48, 64)
        if result != 16:
            print "Test failed"
        print "Test Passed"