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
The comments really helped me understand better what made my trial and error not work. Thanks
This comment is hidden because it contains spoiler information about the solution
That :g float presentation type in f-strings is genius! Now that I know, I won't forget it!
you're supposed to call the methods on an instance, not on the class
(the design of the task is completely bloated, actually, these should have been static or better, class methods. But definitely not instance methods)
TypeError: method() takes exactly 1 positional argument (2 given)
Explicitness is good for whoever is reading your code, but you've got to know how much explicitness is too much.
Hello π
You're right, the goal wasn't to rebuild the code, but to fix the existing one. However, the author wasn't so strict about it, because he didn't include it in the tests. I think it's a trifle, although being very strict, you're right.
Thanks π
You misunderstood the whole purpose of the kata.
Thanks for the appreciation βΊοΈ Best regards π
Hi BitemNet,
An interesting solution. Clever approach!
i first thought of this but mine takes less time
Beautiful!
It's actually very simple. If you don't know how the code works, try to follow it through a few examples, then everything should be clear. There are a few tricks used here.
Tried this and dunno why I ended using .format() instead becaus I had an error pointing the "f". I just tried again now and it didn't appeared.
The other "problem" was due the order of if-elif, being conscient of it I used != 1 or -1 instead. Not best practices, but...
the last line looks kinda cryptic for me
but the solution looks cool actually
Loading more items...