Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
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
[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.