5 kyu

N-Hybrid Inheritance

Description
Loading description...
Probability
  • Please sign in or sign up to leave a comment.
  • ahmet_popaj Avatar

    Quite a challenging kata, well done.

  • RotatingDevelopment Avatar

    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

  • jpssj Avatar

    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.

    • dfhwze Avatar

      added imports; I suggest we make the method name nhi, but also allow NHI in case we don't find it (who knows how to do that in Python ?)

    • jpssj Avatar
      try:
          from solution import NHI
      except:
          from solution import nhi
          nhi = NHI
      

      There could be a better way to do it but that works with the current tests.

    • dfhwze Avatar

      thanks, something along those lines worked

  • brodiemark Avatar

    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?