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.
@VahanHoppar - no problem! You need to be more precise when you ask questions: for the test board that you just gave, the correct answer is indeed
True
. My solution returnsTrue
for it - and so does yours.So presumably, when you say "test returns False" you are not reading console logs correctly. This exact kata is the one used in the Troubleshooting guide where you will see that, when you print the inputs to console, the output that you print appears ABOVE the error message.
So rerun the tests, and make sure that you copy the input from above any Red/Incorrect error messages you get.
Are you sure you're reading the logs ok? Take a look at this, the log appears above the test result: https://docs.codewars.com/training/troubleshooting#print-input
okay i got u, thank u <3
[[7, 4, 1, 8, 3, 2, 9, 5, 6], [5, 9, 3, 7, 6, 1, 8, 2, 4], [6, 8, 2, 9, 5, 4, 7, 1, 3], [3, 2, 5, 6, 8, 9, 4, 7, 1], [8, 6, 7, 4, 1, 3, 2, 9, 5], [4, 1, 9, 2, 7, 5, 6, 3, 8], [2, 3, 4, 1, 9, 6, 5, 8, 7], [1, 7, 6, 5, 2, 8, 3, 4, 9], [9, 5, 8, 3, 4, 7, 1, 6, 2]]
i've chacked this one manually and with online ckacker,it's right solution but test returns False
Hi @VahanHoppar - In addition to the 6 fixed tests (they are the same each time you press Attempt) there are 100 randomly generated tests - they change/are different each time you press Attempt.
That's why there are different numbers of failed tests - you are probably missing a small element/edge case in your code that appears in a few random test cases.
The kata has been solved 17,000 times in Python so the tests are surely correct - if you want to debug you should print the random input to console, then see if you can understand why your code fails on it.
In other words: add
print(arr)
inside your main function and look at the Codewars console for the failed tests you get - you can now try to understand why your code fails for this input.evary time checking returns different results 99/106, 105/106, 101/106...
im almost sure that my code is 100% correct, can u fix this issue