Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    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

  • Custom User Avatar

    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.

  • Custom User Avatar

    It was a great explanation thanks a lot! I was thinking the same as user1772715

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution