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.
Quite a challenging kata, well done.
Question might be a bit idiotic, But I dont understand how to correlate the input with the Allele. Why is Bb ----> B, b while AbCd ----> AC,Ad,bC,bD. What would happen if I had for example 8 digits? QwErTyUi -----> QETU, QETi, QETy etc etc??? Is it just the input/2 in every combination
thanks, something along those lines worked
There could be a better way to do it but that works with the current tests.
added imports; I suggest we make the method name
nhi
, but also allowNHI
in case we don't find it (who knows how to do that in Python ?)Nice one. Function's name is not snake case, the test framework should be imported explicitly, and the return type could be a fraction. Anyway, I'm going to approve it (and then fork it if needed) in the coming days if no one complains in the meantime.
there are some edge cases that i'm not sure should be in the scope of the kata or not, but in any case should be specified:
Is it assumed that Father's alleles and the Mother's alleles are the same? This is the case in the examples, but it's not explicitly stated. Or is it possible to have something like: Father's alleles are Bb and the Mother's alleles are Rr, and if so, how is this interpreted?
Check this solution: https://www.codewars.com/kata/reviews/62aa55d29efd7a000150aba8/groups/62aceb9212bcc90001dd4c2a
The part in comment should also pass this kata.
Float equality is still not fixed. You should use an approximate equality. Atm, only 1 specific solution passes.
what am I missing?
This issue is not solved.
Hey. I've added tests for zero price and zero quantity. Now that I think about it negative price makes sense as there have been historical cases of it. However a negative quantity implies that sellers become buyers and buyers become sellers, which I don't think makes sense. But I could be wrong. Thanks for the feedback
Thanks for the prompt action! :]
Sorry. I did not realise. I have fixed it.
Needs a fixed test case where price or/and quantity is 0. It only happens rarely in random tests.
Also, why is 0 price/quantity not considered valid? It's certainly possible.
Loading more items...