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.
Now the python version works fine!
no language specified, closing
Python 3 should be enabled.
'\0\0\1\1' are four bytes. The least significant bit of the byte is 1 for the two last bytes, so we get 0b100000001 == 257.
why '\0\0\1\1' == 257 ? int('0011',32) == 33 probably a I made a mistake...
I agree, not cool to test sizes explicitely indicated as not being tested ... =)
I took me time to see what the problem was, especially as we have no access to which input values are tested.
jacobb upgraded description about unicode inputs.
I'll add a negative example in the example test cases
Though you say everywhere 'integer' and 'int32' and not unsigned int, you may want to mention negative numbers explicitly in the description and/or add a test with at least one negative result.
The description says “Because of the edge-cases for tiny spirals, the size will be at least 5.”
The tests verify plenty of below-5 solutions, including 0.
Just thought I'd note that you should probably fix either the description or the tests. =)
Ah, I see. I'll remove that irregularity. =)
you are right, I should remove string.upper() in the first line and use the dictionary they give us.
Some tests have "xff" instead of "\xff" (both in the example test cases and in the final tests).
You made two observations.
The first one related to the range. In the details I wrote: range
[a, b]
that has a math meaning. In the comments I corrected to range(a, b + 1) to have this inclusive meaning. I added two example and basic cases using the values89
and135
as extremes of the range.Thanks for your feedback and time to soolve this kata.
Loading more items...