Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Carnot's solution solution in Clear category for The Angles of a Triangle by michal_bien
from math import acos, degrees
def count(a, b, c):
#Carnot's triangle
return round(degrees(acos((a**2+b**2-c**2)/(2*a*b))))
def checkio(a, b, c):
lengths = [a,b,c]
lengths.sort()
if(lengths[0]+lengths[1]<=lengths[2]):
return [0,0,0]
result = [count(b,c,a), count(b,a,c), count(c,a,b)]
result.sort()
return result
Oct. 7, 2016