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.
Yes thanks, I fixed it.
In the example the two highest elements are selected each time, likely because it meant the author had to write less lines. You can select any two non-equal elements at random and reach the same answer.
Reraised as issue
This comment is hidden because it contains spoiler information about the solution
after testing it out, my solution gives 36 and not 35. i am not entirely sure where 35 is coming from...
the logic you are using seems right to me, i'll look into it and see what i can find. (sorry for getting back to you late btw)
Upvoted
Fixed
It's a nice solution, I wasn't aware it could take a default, I took a while to figure out at which point I realised I had misread the kata description and there was only one single error that you needed to find...
Hello bidouille!
I suspect that the output you are showing here is not the original but a SORTED list of cards. Try print(cards) instead. Why does it matter? because it's possible that in the original list of cards, the red for A team ('A9R' in your example) came after the B team went down to 6 players. That means that game is over with (11,6) players, and you should have ignored all the cards that came after that. Description says -
If the game was terminated by the referee for insufficient number of players, you are to stop the game immediately, and ignore any further possible cards.
Hope this helps ???
Fixed. Translating this kata to Python was never a good idea.
Thanks! And thanks for updating to Python 3.
This comment is hidden because it contains spoiler information about the solution
Removed tests with negative numbers by popular demand.
check the python version. But not an issue, yes.
Loading more items...