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.
if it works, it works.
can't complain.
Not sure if I just don't know how Codewars works, but looks like you have no solution to show.
Would be happy to take a look. Mine isn't as elegant as the top 2 answers (I didn't use Object classes or anything), but I think I've got my head wrapped around some good ways to do this kata.
It's definitely more challenging & time consuming than any other <6 Kyu> I've done before. Several sub problems to solve.
I would agree with it being harder than 7kyu.
On the left we check whether the input is
0
. On the right we calculatedigit_sum - 1
and with the second modulo operator check whether the result is odd (since without- 1
the result would have been even).Great story, thank you!
The failing test is
14
, not the whitespace ones. Assertion messages come after your calculations.Not an issue. Print the input.
This comment is hidden because it contains spoiler information about the solution
http://www.asciitable.com/
This comment is hidden because it contains spoiler information about the solution