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.
I can pass the simple test but when I try to pass off I get:
After applying rank of -8 the resulting user rank was expected to be -8, but was actually <bound method User.rank of <__main__.User object at 0x7eff798e9ac8>>: <bound method User.rank of <__main__.User object at 0x7eff798e9ac8>> should equal -8
and I don't know what that means/how to fix. Any ideas?Why/how is
test.assert_equals(solution(rng, -1, 'a'), 3)
a valid test? If the index is out of range it should return the default value, which is 'a'.If you look at the example I try to show what I mean. Say you have an image:
G
andL
are the only pixels with 8 neighbors present but each pixel still needs 8 for the filter to work.A
only has 3, so the other 5 have to come from somewhere else; for this algorithm you should use the edges/corners own values. So withA
the other neighbors in relation to the whole image (besidesB
,F
, andG
) will look like:They both expect int values. Why do you think one or the other expects float values?
I copied the suggested fix to the solution, and just barely to the Test Cases
I have modified/fixed the tests so this no longer works
fixed
moved
I added a clarifying bullet point, does this help or is more needed?
There are some random tests, do you mean with random input as well as length?
The example test case of
justify('123 45 6', 7)
expects123 45\n6
but the rules say:'\n' is not included in the length of a line.
How is123 45
of length 7 (it looks like length 6 to me)? Shouldn't it be123__45
(I can't seem to show two spaces in this so I'm using underscore_
but the point remains)?Can you remove
Please rank and upvote kata. Thanks.
because it isn't part of the description. If users like it they will upvote it.fixed
Can you add some more example test cases and then some more test cases? Maybe have a randomly filled array.
To author a kata hover over your rank in the upper right, the 4th down is 'New Kata'
Loading more items...