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.
Got it – approved!
Thanks for the effort! However, I can't seem to see/approve your Python translation as I could with your Ruby translation; I can only see your Python solution (by clicking View Solution here).
Should I copy and paste that into the Python block and use your existing test methods for Ruby? I'm still new to creating kata :)
Approved – nice work on the additional test methods!
If you want to allow
bounce
values to be >= 1 — implying the ball will be seen bouncing an unlimited number of times, providedh
>window
— I suggest asking for a unique result (e.g. "unlimited") to be returned and not -1. Asking for the same result (-1) when the ball is seen bouncing endlessly as when it is never seen bouncing doesn't make much sense and can cause confusion.Echoing the complaints about input validation below; the instructional parameters are simply misleading/incorrect. In particular,
(float parameter "bounce", 0 < bounce < 1)
needs to be updated to reflect the fact thatbounce
will indeed be passed values >= 1 during testing. Personally, I was only able to complete this kata through assumptions and guesswork.As always, the answer is right in front of you if you only open your eyes! ;) All I need to do now is optimize my logic, since my current solution is timing out. Ancora grazie!
This comment is hidden because it contains spoiler information about the solution
Did you ever find any helplful resources? :)
I would update the definition of 'words' to clarify that they may be connected by non-alphabetical characters and/or add a definition for 'connective characters' as including hyphens, numbers and other symbols. Although the current instructions imply that non-alphabetical characters are not part of words, the exclusive mention of hyphens can mislead Codewarriors into trying to solve this kata with the assumption that only hyphens will be tested. FWIW, submitting my hyphen-only solution returned only the generic "Test didn't pass; Unknown error" response; I had to check the discussion to learn that characters like apostrophes also needed to be considered.
If toFixed() returns a string, what is the purpose of adding an empty string ('') before the final calculation being returned (line 8)? Thanks!
What exactly is this kata asking to be returned? I tried building an array of all the "good values" in the correct order, but my answer was rejected.