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.
Why are the best practices always one-liners, for readability purposes wouldn't it be best practice to ensure the code is easily understood?
Maybe you are not using the backtick for your string or the string is not exactly the same as the example in the instructions.
Disagree...Obviously it was stated there won't be more words..But u have a point, Incase they put out arbitrary length of words
You are correct. I was using " and ' instead of `. At the time, I did not know the difference. I've been learning a lot since then.
Your string needs to be between back-ticks, the ones situates on the left side of the keyboard. These: ``, not these ''
Thanks for your answer! Agreed with a list creation, it improves code readability (at least). Those type of solutions as above considered here as the best practice, because people here (in codewars), love "one-line" solutions. But in my opinion they are often bad in terms of efficiency or readability, so don't worry too much about votes.
Agreed and we'd have to refactor the list creation to store the list as a variable first before we can call len() without duplicating the list for access.
Which leads me to think, why is this considered "best practice"? I've rarely seen production code NOT store a list as a variable first before performing operations. Perhaps this helps to save memory for certain applications.
Would love to have a discussion about the tradeoffs made in this solution.
I did not catch that! Fail
Removed it, it was just an icon of a climber.
There is already an open issue about the broken image, so I'll close this one.
You misunderstood what to do.
The broken image, ok, for the other part, read my answer to your post below.
The rope's length is in meters and the cliff's height is in feet.
The image link is broken and many of the test cases are incorrect. The varied answers using decimals and specific overrides proves this. Specifically, test.assert_equals(can_climb(6,9.1),True) as well as many of the "random tests".
This test case is incorrect, right?
A 6 ft rope can't allow you to climb 9.1 ft cliff
test.assert_equals(can_climb(6,9.1),True)
Loading more items...