diff options
Diffstat (limited to 'testing_and_debugging/script.rst')
-rw-r--r-- | testing_and_debugging/script.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/testing_and_debugging/script.rst b/testing_and_debugging/script.rst index 28bc9f1..0ecc590 100644 --- a/testing_and_debugging/script.rst +++ b/testing_and_debugging/script.rst @@ -70,7 +70,7 @@ Open an editor and type the code shown on the slide and save it as gcd.py {{{ Show slide, gcd function }}} def gcd(a, b): - if a % b == 0: + if b == 0: return a return gcd(b, a%b) @@ -101,7 +101,7 @@ test case we know that the GCD is 16. So that is the expected output. {{{ Show slide,Test for gcd.py }}} def gcd(a, b): - if a % b == 0: + if b == 0: return a return gcd(b, a%b) |