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.
just hope years doesn't get over 1000 lol
good use of recursion
Cool recursive solution ... however, for people who might actually think this is best practice:
For a problem like this you should only do recursion in a language thats supports tail call optimization.
Python does not (at least out of the box at this time as I understand)
There really should be a clear reason for recursion, usually clarity. In this case I don't see it - but meh - that's subjective.
that's the juice of genius
Clever recursion, good show!
It will work but I believe looping would be more efficient.
Agree, I don't think this solution the best practice.
recursion is inefficient compared to loop
it's when fucntion calls itself
can someone give a simple and clear example of what recursion is?
awsome!
beautiful
Python's default recursion limit is just 1000
Let test nb_year(10, 0.01, 1, 2000) with recursion soultion
I think recursive solutions are unacceptable for such tasks
I realize now that I put
int(str(x).split('.')[0])
even though that is the same thing asint(x)
silly me
edit: I changed my solution
My solution is similar, but I dont have another parameter in the definition and I decided to reduce it down to a one-liner lambda function
Loading more items...