@ -4,3 +4,6 @@ def gcd(a,b):
(a,b) = (b,a)
a -= b
return a
def lcm(a,b):
return (a * b) / gcd(a,b)
@ -12,6 +12,9 @@ class more_advanced_calculations(unittest.TestCase):
def test_gcd_of_747_and_81_should_be_9(self):
self.assertEqual(gcd(747,81), 9)
def test_lcm_of_5_and_7_should_be_35(self):
self.assertEqual(lcm(5,7), 35)
if __name__ == '__main__':