def test_is_pythagorean_triple(self): self.assertTrue(my_module.is_pythagorean_triple(3, 4, 5)) self.assertFalse(my_module.is_pythagorean_triple(1, 1, 2))
import my_module sums = [] for a in xrange(1, 1000): for b in xrange(1, 1000): for c in xrange(1, 1000): if a + b + c < 1000: if my_module.is_pythagorean_triple(a, b, c): sums.append(a + b + c) print(max(set(sums), key=sums.count))