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.
That's a great move right here! well done !!
its called aliasing..
number_to_string = str
its like instructing python that str has another name as well, namely 'number_to_string'.
Thanks for the detailed explanation of this approach.
Dayum thats a smart move
Thanks for the explanation!
outstanding move!
How does this work ?
thanks for explaining!
This comment is hidden because it contains spoiler information about the solution
Can anyone explain this solution? thanks
you are right, in productive use this is absolutely vital
You shoudln't just pass on ever OSError, this could also be raised when you e.g. run out of inodes, so you would want to error there.
n
being negative is the challenging part of the kata. I am choosing to leave it in.Thank you for your suggestions. Shall incorporate them.
The instructions are extremely terse. The 'Sum of consequtive numbers' is strange to explain - you could perhaps mention this is a mathematical progression, or mention triangle numbers. When I first attempted the problem I thought 'n' was a list not a number! Mention the types you expect too.
Removing the case of negative numbers would be very good too - they are a bit of a nasty concept here. Leave them in only if you have to.
I would suggest this phrasing:
'sum_of_n' takes an integer 'n' and returns a list of length abs(n) + 1. The list contains the first numbers in the arithmatic series produced by taking the sum of the consequtive integer numbers from 0 to n inclusive.
Loading more items...