def test_lcm(self): # Find lcm of (16, 20) and (20, 16) r, r2 = lcm(16, 20), lcm(20, 16) self.assertEqual(r, 80) # Checks that lcm function is commutative self.assertEqual(r, r2)
def mth_operations_2_inputs(f_code, v1, v2): if f_code == 2: res = extended_gcd.extended_gcd(v1, v2) return res elif f_code == 3: res = lcm.lcm(v1, v2) return res