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.
IMO it should be 3 not 7
I'm running into the same issue. I'm not really sure what I've done wrong, but I'm getting hung up on that last test.
I can modify my code to get the correct answer for that specific instance, but doing so breaks the rest of my responses, so I must be doing SOMETHING wrong, but I can't figure out WHAT.
This one is correct as well.
This comment is hidden because it contains spoiler information about the solution
No, the last digit is
7
.I got the same error. No idea why this is the case
It's a bit of both.
Also, your math is wrong. It would be 9, then 7, then 5, then 3.
4 + 4 * 5
does not equal20
.The math is wrong for this problem. But, so is yours. 5x5 becomes 5 1x5 pieces with 4 cuts. Then 4 cuts for each of the 1x5's to create 25 1x1's. 20 cuts total.
Only reverse words
with all five or more letter words
as it states it the description. You are reversed all words in the sentence but should only be reversing words where letters > 5.Also, why are you using random module, the words should be reversed only if they have more than 5 letters and should not be reversed based on randomness.
Fixes:
return
reserved keyword will break out of the for loop and will not continue if true. This meaning that if the expression evaluates as true, then it will break out of both the for loop and the function. Thus, not every value in the array is checked, it may possibly break out on the first loop.type(arr)
since it won't work for other iterators, what if you were given a string? A string is an iterator and taking the type of this would evaluate as true; therefore, make sure you useisinstance(i, list)
.General Tips:
(I'm assuming the indentation - you should use markdown to format your code)
What language is this? I only know Javascript so I can't help you with this one, sorry.