Light Mode
Dark Mode
wrong answer

I would like to give some feedback about ...

From: http://www.checkio.org/mission/triangle-angles/solve/

HTTP_USER_AGENT:

Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:36.0) Gecko/20100101 Firefox/36.0

I think that in the last test №4 wrong answer

import math

def checkio(a, b, c):

    #replace this for solution
    if (a + b) > c and (b + c) > a and (a + c) > b:
        A = round(math.degrees(math.acos(((b ** 2 + c ** 2 - a ** 2)/(2 * b * c)))))
        B = round(math.degrees(math.acos(((a ** 2 + c ** 2 - b ** 2)/(2 * a * c)))))
        C = 180 - (A + B)
        lst = []
        lst.append(A)
        lst.append(B)
        lst.append(C)
        print(A,B,C)#[A,C, B]
        return lst 
    else:
        return [0, 0, 0]
  • feedback
Created: March 12, 2015, 5:39 p.m.
Updated: March 14, 2015, 11:42 a.m.
0
9
User avatar
migun