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 sebastian009
import math
def checkio(a, b, c):
if (a+b>c) and (a+c>b) and (b+c>a):
x = round(math.acos(((b**2)+(c**2)-(a**2))/(2*c*b))*(180/math.pi))
y = round(math.acos(((a**2)+(c**2)-(b**2))/(2*c*a))*(180/math.pi))
z = round(math.acos(((b**2)+(a**2)-(c**2))/(2*a*b))*(180/math.pi))
return sorted([x, y, z])
else:
return 0, 0, 0
Oct. 19, 2016