Ad
  • Custom User Avatar

    ... x/

    Don't resolve issues while you haven't done anything about them (or at least, not about all its points).

    • still no fixed tests:

    "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)

    • missing edge cases in fixed tests (both sample and test cases parts):

    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.

    • "you're changing the behavior...":

    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.

    • "pretty close to others":

    I never said you'll find them easily. Tho, we already have katas with pretty much the same hassles about the range stuff.

    • number of tests:

    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.

  • Default User Avatar

    I know this would considerably alter the kata, but is any reason why only the start parameter is negative? Python range() also accepts negative stop or step 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 in 0...