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.
Hey @petegarvin1!Nice kata Just a small typo. In the kata description, the output string is not as in your tests. For consistency, it should be 'To beat
user
's (and not user) score, I must completex
Beta kata andy
(and not x as the two numbers are not the necessarily the same) 8kyu kata.'. Also, obviously the assumption here is that we are aiming for the least number of katas (hence more beta katas than 8kyu kata). Maybe better to clarify, otherswise you have two unknowns and only one equation, so there isn't a single solution?This comment is hidden because it contains spoiler information about the solution
Hi @hwtdstrngls. Thanks for this nice kata. I found the description of the kata a bit confusing and it took me quite some time to understand how transposing should be done. So, basically, irrespectively of whether the input notes are in sharp or flat notation the tranposed notes should always be in sharp notation (as inferred by your example code
['Db'] -> -4 steps -> ['A#']
). However, people with no musical background may not know thatBb
andA#
correspond effectively to the same sound. When notes are given in flat notation you have to "convert" and transpose from flat notation to sharp notation. So, could you reword a bit to clarify that? Just a suggestion...Thank you for your suggestion @ZozoFouchtra. By saying words in the description I was referring to both
searchWord
andnewWord
but it's better to clarify this, as you suggested. I just changed it:)Thanks for this kata @Et2rn1ty! I would suggest to rephrase your description to clarify that you are asking for the probability of at least (and not any) two people having their birthday on the same day. This is actually the probability we are calculating in this kata. Other than that, very good idea.
@nbeck I managed to solve this kata with JavaScript (although my solution is rather long!) but as discussed earlier two things you would need to consider are:
The preloaded object where you have the translation codes is called
codons
and not$codons
. You may want to change the description for the kata.The code for the full tests is ok but the testing code for the example tests is not good to compare arrays (thanks to @GiacomoSorbi for noting this). You need to use
Test.assertSimilar()
in the example tests. (this is why I couldn't pass the first tests although my results were as expected!).Other than that, great kata!
@bkaes I'm using JavaScript and
$
should not to be a problem at the beginning of an identifier. I don't really get what's the problem with my code...It seems that I can get access to the translation of the tri-nucleotides (e.g.
codons['TTT']
) without initial dollar sign (not sure why this is happening though!). Another problem I have is that I get what is expected in the initial tests but the tests don't pass. Any help? @nbeck @ bkaes @GiacomoSorbiThanks for this very interesting kata @nbeck! I am trying to use the translation hash provided, as described in your instructions but I get a reference error saying $codons is not defined. Am I missing something obvious here?