Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
The same, but slightly altered solution in Clear category for The Angles of a Triangle by Vulwsztyn
import math
def kat(q,w,e):
i=(q**2-w**2-e**2)/(-2*w*e)
i=math.acos(i)
i=math.degrees(i)
return i
def checkio(a, b, c):
if 2*max(a,b,c)>=a+b+c:
return[0,0,0]
j=int(round(kat(a,b,c),0))
k=int(round(kat(b,c,a),0))
l=int(round(kat(c,a,b),0))
list=[j,k,l]
list.sort()
#replace this for solution
print(list,j,k,l)
return list
#These "asserts" using only for self-checking and not necessary for auto-testing
if __name__ == '__main__':
assert checkio(4, 4, 4) == [60, 60, 60], "All sides are equal"
assert checkio(3, 4, 5) == [37, 53, 90], "Egyptian triangle"
assert checkio(2, 2, 5) == [0, 0, 0], "It's can not be a triangle"
Dec. 2, 2016