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.
This is a really good example of a challenge that needs to be thoroughly commented. Imagine trying to work with all these different answers and figure out what is going on! Comment your code people lol
This comment is hidden because it contains spoiler information about the solution
Didn't exactly feel like an 8 kyu exercise. The implementation was simply enough, but the logic I feel like is a bit of a head scratcher.
This comment is hidden because it contains spoiler information about the solution
What was the reason for having the last line with no line break?
The expected result shows that the basic tests require the trailing '\n' to pass them. My code does not provide that. When I run my solution, it literally prints the exact result requested in the kata. Try it.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I learned something here so thank you for your comment.
What happened was, I was using * arr as when I tried to run the program in python IDE it was throwing an error that I gave the function 8 positional arguments.
This was because I did not define the array and then use it's name (arr) to pass it to the function. Once I removed * and defined the array, then passed it, it worked.
The error messages in the tests confused me because the first sample test error message was that None should equal 6. I thought that meant that it was skipping the trigger return statement in my loop that would terminate the function, returning what result was first initialised as. I thought for some reason the return statement in the loop was not working in codewars lol
So yea, now I understand and thank you once more.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
oh damn, so it is spelling mistakes. let me try that and I will update here lol thank you
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...