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.
... x/
Don't resolve issues while you haven't done anything about them (or at least, not about all its points).
"Sample tests" part: you have fixed tests there: result is hardcoded, meaning the test is the same every time. "Test cases" part: there you only have the random tests, so there is no fixed tests in the validation test suite (seems you don't know that: when clicking "attempt", only the "test cases" part of the kata is executed)
sample tests are better, tho they are missing a case like
'-521'
(it should actually be the very first tests). Push all those fixed tests in the test cases part after that.What I meant is that you're using the name
range
everywhere, while python's range is "second bound exclusive" while yours if "second bound inclusive". Usesr who are reading quickly the description won't notice the difference with the current description before they hit weird things in the tests.=> what's the point? You're just creating artifical hassle. It's the kind of pretty annoying requirement that is just there to type more code.
EDIT: Reading Voile's issue below I finally saw your modification about that... As you can see, it's not that visible, for now.
I never said you'll find them easily. Tho, we already have katas with pretty much the same hassles about the range stuff.
You absolutely don't test anything about performances for now, since you use pretty much the most basic algorithm. And as Voile said, considering the kind of ranges you can encounter here and the fact that builtins in python are much faster then interpreted python code, there are pretty much no chances that you can see a difference between a function iterating over the ranges from a really (supposedly) efficient one that would compute the sum directly. So your number of tests is definitely pointless and should just be reduced to 100 tests approximately.
I know this would considerably alter the kata, but is any reason why only the
start
parameter is negative? Python range() also accepts negativestop
orstep
parameters. This would result in strings like,"182 -993 7-44 61-1 -9-32 -30-1 3-9-3 -1-9-2"
... where I suppose"7-44"
and"-30-1"
being empty would result in0
...