Code Not run properly
Hey,
I have written below code for angel of triangles.
import math def checkio(a, b, c): othline = [a,b,c] otherline = [i*i for i in othline]
mxline = max(a,b,c) othline.remove(mxline) a2,b2,c2 = otherline oth1,oth2 = othline #print(a2,b2,c2) # cosA = -a2+b2+c2/2bc for find one angle from given length of triangles # cosB = a² + c² -b²/2ac cosC = b² + a² -c²/2ba # tmpA = ((-a2)+b2+c2)/(2*b*c) tmpB = ((-b2)+a2+c2)/(2*a*c) tmpC = ((-c2)+b2+a2)/(2*b*a) A = round(math.degrees(math.acos(tmpA))) B = round(math.degrees(math.acos(tmpB))) C = round(math.degrees(math.acos(tmpC))) result = [A,B,C] if(A !=0 and B!=0 and C!=0 and ((A+B+C)== 180)): return(sorted(result)) else: return([0,0,0])
This Code does not word in check io module. also, this code run without any error in my system(ubuntu 16.04). I user python3.