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 magda_kudrycka
from math import degrees, acos
def angle (a, b, c):
kat = degrees(acos((a**2 + b**2 - c**2) / float(2*a*b)))
return round(kat)
def checkio(a, b, c):
a, b, c = sorted([a, b, c])
if (c >= a + b):
return [0, 0, 0]
else:
return sorted([angle(a,b,c), angle(b,c,a), angle(a,c,b)])
Nov. 27, 2016