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 iurii.skorniakov
from math import acos, degrees
def angle(a, b, c):
return round(degrees(acos((a**2 + b**2 - c**2)/(2.0 * a*b))))
def checkio(a, b, c):
if a + b > c and a + c > b and b + c > a:
return sorted([angle(b, c, a), angle(c, a, b), angle(a, b, c)])
return [0, 0, 0]
Aug. 24, 2017