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.
which is? genuinely asking.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
@brendanvos
Your own solution also mutates the original list passed trough the function.
Out of curiousity i tried your solution in Pycharm. I stored [1, 1, 1] in a variable x, stored 10 in varuable y, called the function with (x, y) parameters and after requested a print(x). Both the print(function) and print(x) yielded the same result.
I think the biggest problem is (almost) everyone can vote.
I consider myself prety much a beginner and have eroniously voted for less efficient code because I thought it was the best. Maybe only users with high kuy score should be able to vote for best practices. Or even better, active people vetted by mods.
for this test it doesn't realy matter since all input are integers, but in a different scenario, you could be working with a float. In that case, (x>7) != (x>=8).
Since the question specifically stated "handicap greater than 7", I would also prefer writing this as x>7, as it is the litteral translation of the question.
I found the issue, my mistake
Yet I stand by my point that not seeing what the test is doing, does not help in finding the bug.
My python code works fine in the standard "test", but I get issues in the randomized tests.
It would be helpfull if I could see how the random tests were generated, so I could see where it's failing.
as it stands, I have no clue what's wrong.
Yeah, I just finished my 4th practice and just now I found there is a step after "test", where you submit your result and get to see other's solutions.
Well, we're learning!
I passed the assignment, but I wonder if there's a simpler way to do this?
I'm working in python and used a dictionary, but somehow I feel it could have been achieved with less code.
Do you mean certain python expressions don't work? or are you failing a specific test?