Your strict math teacher is teaching you about right triangles and the Pythagorean Theorem --> a^2 + b^2 = c^2
whereas a and b are the legs of the right triangle and c is the hypotenuse of the right triangle.
On the test, however, the question asks: What are the possible integer lengths for the other side of the triangle?
. Since you never learned anything about that in class, you realize she meant What are the possible integer lengths for the other side of the right triangle?
.
Because you want to address the fact that she asked the wrong question and the fact that you're smart at math, you've decided to answer all the possible values for the third side EXCLUDING the possibilities for a right triangle in increasing order.
Return your answer as a list of all the possible third side lengths of the triangle without right triangles in increasing order.
Examples
side_len(1, 1) --> [1]
side_len(3, 4) --> [2, 3, 4, 6]
side_len(4, 6) -->[3, 4, 5, 6, 7, 8, 9]
Tests
side_len(5, 12)
side_len(8, 10)
side_len(3, 4)
Good luck!
This challenge comes from tonylicoding on CodeWars. Thank you to CodeWars, who has licensed redistribution of this challenge under the 2-Clause BSD License!
Want to propose a challenge idea for a future post? Email yo+challenge@dev.to with your suggestions!