Ad
  • Default User Avatar

    Hi! It's been a while since last time, but I still can't complete your kata.
    I'm still using the same code, all tests pass, but when submitting I get an unspecified error.
    My test cases are
    Test.assert_equals(triangle_type(7,3,2), 0) # Not triangle
    Test.assert_equals(triangle_type(2,4,6), 0) # Not triangle
    Test.assert_equals(triangle_type(8,5,7), 1) # Acute
    Test.assert_equals(triangle_type(3,4,5), 2) # Right
    Test.assert_equals(triangle_type(7,12,8), 3) # Obtuse

  • Default User Avatar

    [Ruby] When trying to solve using Pythagorean theorem and triangle inequality (without calculating angles through law of cosines) all tests succeed, but an "acute" test fails, it returns 0 and expects 1. According to triangle inequality it should not be a triangle, because the sum of the smaller sides should be higher than the bigger side.