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.
This comment is hidden because it contains spoiler information about the solution
Typo in the first example - Python description
cell (x = 8, x = 8)
=>cell (>>> y <<< = 8, x = 8)
Quite generic implementation - you have also a converter from tabular to gregorian calendar for free.
Kudos for the clean solution!
You can avoid a
copy
with a simple syntax making it quite similar to using a unique pointer in C (cf this kumite not to spoil others in comments)Not really the same issue.
For yours, you just have to consider it goes back to 6.
Even negative indexes could be defined that way.
No floating point division involved - only integer division
You might expect a player attempting a 4kyu kata knows these builtins and bump your requirements consequently.
Looping fast is not that helpful if the expected algorithm doesn't have the same order of magnitude.
-Bump for previous message-
This comment is hidden because it contains spoiler information about the solution
Planning to release this kata for Python?
One pass only
Here you can talk about functional programming, which finds its roots in lambda calculus.
But here stops the comparison, because there isn't something close to a computational model here.
Lambda calculus and Turing machine are equivalent computational models because they can solve the same class of problems.
I have the feeling that the comparison you want to bring here is more about functional programming vs. imperative programming.
Adding comments may help as in your solution, kudos for that.
However using a bunch of
if
s that only vary by a word/letter is not very pythonic as well.Meaningful variable names is often much better than a long comment.
If you remove the comments in your solution, it is not much different than this solution, just longer.
Passing float instead of integer to a function raises more likely
TypeError
instead ofValueError
.(see for example https://github.com/python/cpython/commit/f066bd94b9225a5a3c4ade5fc3ff81e3c49b7b32)
May be more interesting to switch to
TypeError
instead.Loading more items...