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.
Super clean and readable!
It's far from best practice to leave obselete comments in...
you probably trained on this kata long ago and the sample tests were cached by Codewars, reset them
I can't reproduce that with the initial code.
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
can you provide a more detailed explaination of this? thank you!!
Elegant solution for 'if/else 0'. Every time forget about if, however met it several times before.
Ok, I removed that entry. Let's wait and see what happens.
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
looking a tthe code, it lookw like what you're saying is impossible.
On the other hand, the input could be something equivalent to
00x
, then producex00
. But the constraint is on the output, not the input. => ?Yes, quite sure.
I had to rewrite my solution which started finding squares from 16, because it failed in returning 9...
I couldn't reproduce. Are you sure?
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!
Loading more items...