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.
Another great kata of the series, well done.
Python fork, please review:
it's not a huge prblem, but it's not good when the user read one thing in the description and get something else in the tests.
you can use code blocks with languages, to make the description match python implementation, or you align python code, using lists of lists (yeah, I don't like it either, and if other languages "happen", code blocks will be needed anyway at some point...)
Another way would be to make the description language agnostique, describing the problem and examples without any actual implementation. Not always easy...
Hi. I translated it in Python, the kata was originally written in JS. I chose a list of tuples to avoid potential problems with input modification (and now I think I should have chosen a tuple of tuples to be consistent). But is it really a problem, since the structure of the input is specified with type hints ?
Hi,
the description is showing lists of lists for python, while the inputs are lists of tuples.
Cheers
not an issue, a question.
Thank you too.
Done! Thank you for bringing it up.
Approved by someone.
I think it is easier to just amend the description once that for departure==arrival he still leaves the house to go for a walk than to adjust all random generators of existing translations to not create these cases as they likely don't break current solutions.
This is a great question, I hadn't considered this at all! And as currently implemented, the random tests could generate travels with the same origin and destination, so it is worth considering.
I'm thinking that these represent travels (the wording in the description describes them as such) and therefore if you travel from home to home, you still wander outside for a bit, potentially get rained on, then come back. But this is a bit lawyer-y.
We could also say "no location will be the same as the current location" in the description, and amend the random tests so that it is true.
What do you think?
Python translation, please review.
When the wanderer comes back to a place, he can re-use the umbrellas that he left there before. He left an umbrella at the shop earlier, so he can re-use it now instead of picking up a new one. (Very nice of the shop-keeper to store this guy's umbrellas)
This comment is hidden because it contains spoiler information about the solution
Loading more items...