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.
Good question! I think it's because it introduces the
re.VERBOSE
flag (to some) and because it's a relatively old solution (>3 years). I agree with you that it has too many problems to be best practice.Just found another problem in addition to those below:
.
isn't escaped in the patterns, sowwwzexamplezcom
will pass. Oops.Nope, that'll just create another solution. :/
Back when I submitted this I didn't even know one could complete a kata without submitting it, so I submitted all my solutions.
This comment is hidden because it contains spoiler information about the solution
It's extremely unpythonic! If I could go back and edit this I would definitely move the
import
statement to the top of the file. (I submitted this solution a few years ago)Edit: Also the indentation on that dictionary -- yuck
This comment is hidden because it contains spoiler information about the solution
Correct! The kata's test cases should be updated, if possible. Thank you for the comment. It could help people who come across this solution.
Edit: The error is probably in the second last line -- see the other comment below.
Goodness, I can't believe I imported inside functions back in those days. Folks, avoid that as well!
Yes! Agree completely. It would be easier to read and remove a redundant function call. It's been a while since I submitted this solution -- wish I could invalidate it ^^;;
Thanks for the feedback, hope it helps other people who see this solution.
This comment is hidden because it contains spoiler information about the solution
The examples make it clear, but it would be nice to note that the end index is inclusive (since it often isn't when talking about ranges).
I suppose a good way to do it would be for the author to supply a custom
random
function, or to set the seed manually (though that would be easier to manipulate).Yes, I was a little confused too. I agree that it's not so important since the description states that
x
refers to the column andy
refers to the row, but it would perhaps be clearer to usei
for the row andj
for the column, or simply name themrow
andcolumn
. Not a big deal either way, though! :)Thank you kindly! :)
This comment is hidden because it contains spoiler information about the solution
I made some edits:
neigbourhood -> neighbourhood
old men -> old man
how to be a work -> how to work
theyplay -> they play
In initial solution:
solution
->candyCount
However, I agree with the other comments that the description could be clearer. I think it could stand to be edited a little more.
Loading more items...