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.
No problem! Congratulations and well done for sticking with it.
Thank you, bro!
I solved it, with your advice C:
No worries, you're welcome!
As I don't work in Java I can't see your solution to have a look in detail - but are you 100% sure about the "set progress to 0" thing though? If your error message is:
"After applying rank of 8 the progress was expected to be 0, but was actually 1"
that's what the problem sounds like to me.
To be clear: in Python (my language) there is a test where you start at rank 7 with 91 points and increment by 10 to "101 points" to reach rank 8. If your current approach then does something like "check if points > 100", you will remove 100 from 101 to leave 1 point left over at rank 8. However, the expected behaviour is that you should immediately set the "1" point leftover to 0.
This is what seems to be the case you are failing on, so double check if that's the problem? If not, then I'm out of ideas, so maybe the best bet is to ask in Codewars Discord #java channel.
Hi mate, thanks for you reply!
But i did it, my algorithm return progress equals 0 when user's rank is 8.
When i test it, everytime i got 0 points progress when users' rank is 8.
So I really don't know what's wrong with my algorithm :C
Hi @kissmylala (nice name btw O_o) - I think your issue is related to the one another user had recently:
see this comment in the thread
Basically when you reach rank of 8, it is expected that the
progress
gets set to0
. That's the condition that you are failing with, even though it's not very clear from the messages.It's from this line in the description:
"The exception is if there is no other rank left to progress towards (Once you reach rank 8 there is no more progression)."
After applying rank of 8 the progress was expected to be 0, but was actually 1 expected:<0> but was:<1>
What's wrong?
I did that difference with 2 or more ranks worths 1 progress point.
and after getting rank 8, you couldnt up your progress anymore
Did it work with just Expection?