Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
No idea how it works solution in Clear category for The Angles of a Triangle by Vulwsztyn
import math
def angle (a, b, c):
return math.degrees(math.acos((c**2 - b**2 - a**2)/(-2.0 * a * b)))
def checkio(a, b, c):
if max(a,b,c)==a and a>=b+c:
return[0,0,0]
if max(a,b,c)==b and b>=c+a:
return[0,0,0]
if max(a,b,c)==c and a+b<=c:
return[0,0,0]
A = angle(a,b,c)
B = angle(b,c,a)
C = angle(c,a,b)
A=int(round(A,0))
B=int(round(B,0))
C=int(round(C,0))
if A>B:
if B>C:
return [C,B,A]
else:
return [B,C,A]
else:
if A>C:
return [C,A,B]
else:
return [A,C,B]
Oct. 25, 2016