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.
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.
Although this isn't necessary within this context, I gotta say, this is quite robust regardless of the context! Nice work :P
This comment has been deleted.
too long for the problem statement in my opinion
YOU DID IT!
I think "clean code" or comments (dsnt matter) way is useless in this case.
wanted to habe the most "best practice" but (doc)tests and docu do not seem to be taken into account :/. anyway, if you like the format string have a look at f-strings https://zetcode.com/python/fstring/ (python >= 3.6)!
bro this guy is on another level, meanwhile I'm flipping over "{:02X}" hhahahaha. COngrats!!