diff options
Diffstat (limited to 'testing_and_debugging/gcd.py')
-rw-r--r-- | testing_and_debugging/gcd.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/testing_and_debugging/gcd.py b/testing_and_debugging/gcd.py new file mode 100644 index 0000000..b8d1296 --- /dev/null +++ b/testing_and_debugging/gcd.py @@ -0,0 +1,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" |