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 maxadamski
from math import *
def angle(a, b, hyp):
return round(degrees(acos((b**2 + a**2 - hyp**2) / (2*a*b))))
def checkio(a, b, c):
if a + b > c and a + c > b and c + b > a:
return sorted([angle(a,b,c), angle(b,c,a), angle(c,a,b)])
else:
return [0, 0, 0]
Oct. 19, 2017