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.
This comment is hidden because it contains spoiler information about the solution
Not sure how to get past this...
def descending_order(n)
n.to_s.reverse.to_i
end
Test Passed: Value == 0
Test Passed: Value == 1
Test Passed: Value == 111
Test Passed: Value == 51
Expected: 2110, instead got: 1201
Initially, I felt like rating this an 8kyu however based on the descriptions I rated this a 7kyu although it seemed fairly easy to me at this point in my training. Keep in mind that I have done a bunch of the "Enumberable Magic" kata before once you get the concept down it all makes perfect sense.
This comment is hidden because it contains spoiler information about the solution
I'm not sure what I'm missing as my tests pass but when I submit it fails and it's not telling me why...
Hi, when I run the test it passes, but fails when I submit.
I get the following error:
Expected: 2110, instead got: 1201
If I enter 0112 (my assumption based on what is expected) into IRB I get 74. Seems like leading zero is interprets the number as Octal. Do I need to account for this in my code?
Thanks,