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 MaciejKrasny
def checkio(a, b, c):
from math import acos, degrees
if a+b>c and b+c>a and a+c>b:
alfa=round(degrees(acos((b**2+c**2-a**2)/(2*b*c))))
beta=round(degrees(acos((a**2+c**2-b**2)/(2*a*c))))
gamma=round(degrees(acos((b**2+a**2-c**2)/(2*b*a))))
return sorted([alfa, beta, gamma])
else:
return [0,0,0]
Nov. 4, 2016