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.
that number refers to the total number of bears that are present in the valid mating pairs
Yes, that is an issue in Python version of this kata.
The instructions say: "compare the number of pairs"
but the test check the number of bears that mate
There some not right random tests. For example some not right tests.
Testing for 6 and 'B8lB888B88Bii'
['B8B88B8B', False] should equal ['B8B88B8B', True]
I count pairs in right answer and theres only 4 pairs. But it returns True. I don't know my code is wrong or i misunderstood task.
More example. Sorry for my english if i wrote something wrong.
Testing for 6 and '8BBbBea8eB8BBf8b88B'
['8BB88B', False] should equal ['8BB88B', True] There is 3 pairs
Testing for 7 and 'Bb8BbgmBb8B8geB8BBaicii8B8'
['8B8BB88B', False] should equal ['8B8BB88B', True] There is 4 pairs
I think the some tests answer is not right.
In the first sentenced it is explained that x is number of pairs of bears:
"In order to (...) it has x number of mating pairs of bears."
However indeed the test is not passed if we count pairs, we need to cont bears instead.
Therefore, I think it is a mistake in the kata.
Approved, thanks. I don't know C++ so happy for people to edit.
Python.
I tried the couples at first but some random tests were failing... even more confusing since the basic tests work for both couples and total bears :)
JS expects amount of pairs, not bears. Which language you have this issue with?
I think there is a problem in the definition:
"Return an array containing a string of only the mating pairs available
[...]
and true if the number is more than or equal to x, false if not"
THE number is vague and does not refer to anything. I find this particularly confusing because it would be intuitive to count the number of couples (as if it said "their number", referring to mating pairs), but the solution requires the total number of bears which are mating instead.
Confusing.