Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
The Angles of a Triangle solution in Speedy category for The Angles of a Triangle by nikoov
from math import acos, degrees, ceil
def checkio(a, b, c):
if a < b + c and b < a + c and c < a + b:
sum = a + b + c
result = sorted([round(degrees(acos((a**2 - b**2 - c**2)/(-2 * b * c)))), round(degrees(acos((b**2 - a**2 - c**2)/(-2 * a * c)))), round(degrees(acos((c**2 - b**2 - a**2)/(-2 * b * a))))])
return result
else:
return [0, 0, 0]
June 18, 2017
Comments: