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.
You can try it, if the start number is greater than the end number, the result will be an empty set, and the sum will be 0.
For this case it won't make a difference since we do not have any block within the function.
This comment is hidden because it contains spoiler information about the solution
Awesome, thank you!
This comment is hidden because it contains spoiler information about the solution
I learned algebra with yoru solution
This comment is hidden because it contains spoiler information about the solution
Any one here can explain me I didnot understand this! I am not good in Math
This comment is hidden because it contains spoiler information about the solution
Hello, Can someone explain why this solution returns 0 if end number is smaller that start number?
What does range(6,3) return? why sum of the range returns 0?
Very good readability +1
Only note is 'var' is now 'let'
I do not understand how the Kata description " How many years does the town need to see its population greater or equal to p = 1200 inhabitants?" when we have used population < target.
Feel free to design an advanced spinoff of this puzzle though where this may be important.
Citing the kata description:
aug is an integer, percent a positive or null floating number, p0 and p are positive integers (> 0)
Why catch errors when they are not expected by definition?
What if aug (inhabitants coming or LEAVING each year) is negative and bigger than % increase? It's a really efficient code but cound do with an error catcher, maybe?
Loading more items...