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 artur_mierzwa
from math import acos
from math import pi
def checkio(a, b, c):
bok=[a, b, c]
bok.sort()
if a==b and a==c and b==c :
return ([60, 60, 60])
if bok[0]+bok[1]<= bok[2]:
return([0, 0, 0])
kat1=round(acos((bok[0]**2 +bok[1]**2 -bok[2]**2)/(2*bok[0]*bok[1])) *180/pi)
kat2=round(acos((bok[0]**2 +bok[2]**2 -bok[1]**2)/(2*bok[0]*bok[2])) *180/pi)
kat3=round(acos((bok[1]**2 +bok[2]**2 -bok[0]**2)/(2*bok[1]*bok[2])) *180/pi)
return ([kat3, kat2, kat1])
Oct. 29, 2016