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 know it has been more than a year, but just in case someone else has the same question. It depends on the kata creator, and most of the time, if validation is needed, it is specified in the description. However, in this specific case, it is not, and there are cases with negative numbers that need to be considered as 0, and values over 255 that need to be considered as 255. One thing that is specified is that you need 6 characters solution or won't work, this is because by default, zeroes on the left are deleted.
That's why it is useful to use control codes to identify when something is not working.
Great! It was a challenge one of the tests saying "Invalid value types (boolean): True should equal False" it was time consuming but after lots of reading and changing the code it worked just fine. Looking at other solutions I realize it will be a while until I can get a code that doesn't look so beginner :p
I'm still not sure when is necessary to make a deepest validation of data in the katas. My solution contemplates that the values received will be any integer so I didn't raise errors in regard to the type of the object. Thanks for the introduction to doctest.
It was a great explanation thanks a lot! I was thinking the same as user1772715
This comment is hidden because it contains spoiler information about the solution