Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for The Angles of a Triangle by slickLash
#!/usr/bin/env python3
from math import acos, asin, sin, degrees, pi
def checkio(a, b, c):
a, b, c = sorted((a, b, c))
if not c < a + b:
return [0, 0, 0]
C = acos((a ** 2 + b ** 2 - c ** 2) / (2 * a * b))
B = asin(b * sin(C) / c)
A = pi - C - B
return sorted(round(degrees(x)) for x in (A, B, C))
March 10, 2015
Comments: