Light Mode
Dark Mode
Not tested, the offset values
import math
def checkio(a, b, c):
    ang=[]
    try:
        a_a = (b * b + c * c - a * a)/(2 * b * c)
        a_a = math.acos(a_a)
        b_b = float(a * a + c * c - b * b) / (2 * a * c)
        b_b = math.acos(b_b)
        ang.append(int(round(math.degrees(a_a))))
        ang.append(int(round(math.degrees(b_b))))
        ang.append(180 - ang[0] - ang[1])
        return ang
    except:
        return [0,0,0]

Attached screen which shows that in the fourth step, the result of why that is swapped. On my computer the result is in the proper order. Somebody please explain what is the problem? (Sorry for bad english) To solve the problem using the cosine theorem

err_1- there is an error when checking

err_2 - Reverse the order of the variables and the right decision

my_comp - correct information on my computer

Attachment
Attachment
Attachment
Created: Sept. 30, 2016, 7:42 a.m.
Updated: Sept. 30, 2016, 9:06 a.m.
0
9
User avatar
greatdragone75