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.
There is a problem in python tests:
Traceback (most recent call last):
File "/workspace/default/.venv/lib/python3.11/site-packages/codewars_test/test_framework.py", line 112, in wrapper
func()
File "/workspace/default/tests.py", line 126, in single_test
print_chessboard(chessboard)
^^^^^^^^^^^^^^^^
NameError: name 'print_chessboard' is not defined
Item # 71 in RESULT dictionary is (1,): 9
I think, it should be removed or kata description changed to 1 ≤ s.length
Sorry, can't do it myself, possibly I don't have rights for that
This comment is hidden because it contains spoiler information about the solution
Yes, quite sure.
I had to rewrite my solution which started finding squares from 16, because it failed in returning 9...
The description says:
2 ≤ s.length
and:
leading zeros are not allowed
But random tests (in Python) can generate a test with answer 9, which has one digit.
This solution will NOT work with the long strings.
For example, the values
entered_code = 5000 * '11'
correct_code = 10000 * '1'
will result to False!
This comment is hidden because it contains spoiler information about the solution
Ok, got it, thanks!
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
This comment is hidden because it contains spoiler information about the solution
It is usually considered as a bad practice for a function to have such side effect as a change of the given argument. We either return the new list or change the given list in place, but not both.
This comment is hidden because it contains spoiler information about the solution
I suppose that
correct_tail('abc', 'bc') should return False,
because the second argument is NOT the same as the last letter of the first argument.
This solution returns True instead.
Loading more items...