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.
Drop input validation (negative values).
Tests crash when run with initial solution.
This comment is hidden because it contains spoiler information about the solution
Running the initial solution (or indeed any solution which returns a non-numeric value) reveals the solution to the user in the stack trace.
Reraising: random tests have bare assertions inside a describe
Random test code is extremely bizarre and should probably be modified:
This comment is hidden because it contains spoiler information about the solution
Kata cannot be passed since there's no assertion done when all of the results are correct.
You should use
test.assert_approx_equals
instead, or add else statement containingtest.pass_()
in theassert_almost_equal
function.Whatever formula you're using is clearly incorrect anyway, as it gives negative area at
alpha >= 37.83
.Also, why suddenly use angle in degrees in this kata? You used angles in radians in the previous kata. It seems that your katas are inconsistent with themselves.
This comment is hidden because it contains spoiler information about the solution
The title
"should return '12' for (0, 2)"
is incorrect, and very misleading.a, a+1
.