Anonymous user
Law of cosines - triples: Difference between revisions
→Sets: Corrected extra credit value.
m (→{{header|zkl}}: fix sort bug) |
(→Sets: Corrected extra credit value.) |
||
Line 651:
if c2 in sqrset:
tri90.add(tuple(sorted((a, b, int(c2**0.5)))))
ab = a * b
c2 -= ab
if c2 in sqrset:
tri60.add(tuple(sorted((a, b, int(c2**0.5)))))
c2 += 2 * ab
if c2 in sqrset:
Line 678 ⟶ 676:
120° has 2 solutions:
[(3, 5, 7), (7, 8, 13)]
Extra credit:
===Dictionaries===
|