# import the function from greatest_common_divisor import greatest_common_divisor # name of .py file name of function """ The following tests are performed: | num1 | num2 | GCD | |------|------|-----| | 12 | 18 | 6 | | 10 | 15 | 5 | | 1024 | 192 | 64 | | 100 | 1000 | 100 | | 1000 | 100 | 100 | | 23 | 23 | 23 | """ expected = 6 output = greatest_common_divisor(12, 18) if output != expected: print("FAILED the following test:") print("greatest_common_divisor(12, 18) returned", output, "should be", expected) expected = 5 output = greatest_common_divisor(10, 15) if output != expected: print("FAILED the following test:") print("greatest_common_divisor(10, 15) returned", output, "should be", expected) expected = 64 output = greatest_common_divisor(1024, 192) if output != expected: print("FAILED the following test:") print("greatest_common_divisor(1024, 192) returned", output, "should be", expected) expected = 100 output = greatest_common_divisor(100, 1000) if output != expected: print("FAILED the following test:") print("greatest_common_divisor(100, 1000) returned", output, "should be", expected) expected = 100 output = greatest_common_divisor(1000, 100) if output != expected: print("FAILED the following test:") print("greatest_common_divisor(1000, 100) returned", output, "should be", expected) expected = 23 output = greatest_common_divisor(23, 23) if output != expected: print("FAILED the following test:") print("greatest_common_divisor(23, 23) returned", output, "should be", expected)