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.
Sorry, you're right. The tests could be improved in order not to crash, but the problem is you return a
bool
when you should return alist
. The test crashes because it tries to apply a slice to your answer, which wouldn't happen with a list. It doesn't say tests fails because the test doesn't finish (it crashes).Thank You for answer, but actually, it's line 18 of << "tests.py", line 18, in doTests >>, not of my code. And that's mean the test doesn't process answer False right. But there 0 tests failed as it's said in the begining of log.
It's hard to help you without knowing your code, but the log is explicit: on line 18 of your code, you try to apply subscript to
actual
(subscript means you try to access an index slice, here using[:-1 ], [1:]
) to abool
object (which meansactual
isTrue
orFalse
). This is not possible (True[:-1]
doesn't make sense), so your code crashes.The official documentation can help you: https://docs.codewars.com/training/troubleshooting/
Time: 2790msPassed: 18Failed: 0Exit Code: 1
Test Results:
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
STDERR
Traceback (most recent call last):
File "tests.py", line 26, in
doTests()
File "tests.py", line 18, in doTests
a,b = actual[:-1],actual[1:]
TypeError: 'bool' object is not subscriptable
I don't understand what I do wrong.
Hello.
This is the time my code takes on my PC: 0.006575283594429493 seconds.
I every time get timeout on Your servers. Sorry, i give up.