6 kyu

Range function

725 of 1,407wichu
Description
Loading description...
Fundamentals
View
AllIssues8QuestionsSuggestions5Show Resolved
  • Please sign in or sign up to leave a comment.
  • jkimbell Avatar

    This could be an interesting pattern-matching problem, but right now it's just a trick about whether you read the order of two very similar words

  • HabibTechie Avatar

    There seems to be some issue with this kata, I get: Expected: '[1]', instead got: '[]'. But I don't undertand why because right before this line I get another message that the test passed with expected value [1].

  • geokoko Avatar

    In Prolog, when running the test cases for the 'range' predicates, the tests are returning a list of a list instead of a single list. For example, for range(5), I would expect the result to be [1, 2, 3, 4, 5], but the test returns [[1, 2, 3, 4, 5]].

    It seems the issue lies in how the 'findall/3' predicate is used within the tests. It actually collects the resulting list of the 'range' predicates in another list.

  • Ganijon Avatar

    Expected [2,5,8,11,14]: [2] should equal [2, 5, 8, 11, 14]

  • agimenez122 Avatar

    Hello, I have this error in the test 'Expected: '[]', instead got: '[2]'' but I can't see what parameters the test is passing to the function.

  • stellartux Avatar
  • saudiGuy Avatar

    python new test framework is required. updated in this fork

  • FArekkusu Avatar

    Create range generator function

    Python version doesn't require the user to implement a generator (nor return an iterator which should be a reasonable alternative IMO).

  • Wei-Ting Yang Avatar

    In Python, the kata asks us to create a generator function. However, this is not tested at all. Even the reference solution is not a generator function.

  • farhanaditya Avatar

    JS:

    This function should return an iterable object

    This is not enforced. You can just directly return an array and passed.

  • Graham G Avatar

    Nice twist having a variable number of arguments to deal with!

  • FArekkusu Avatar

    Example is not a specification.

  • pre Avatar

    For the description, can it be noted that which of the arguments is the start value, step and stop value? It's not clear, so requires the user to refer to the examples to figure out which is which if one or more are not declared.

    Consider adding a few sentences like: "When one parameter is defined, assume it to be the stop value with a step of one. When two parameters are defined, assume they are the start and stop values, respectively, with a step of one. When three parameters are defined, assume they are the start, step and stop values, respectively."

    Thanks

  • siebenschlaefer Avatar

    Python: The description asks for an iterable but the tests only accept instances of list.

  • Blind4Basics Avatar

    This comment has been hidden.

  • adrian.eyre Avatar

    Ruby and Python translations, please check and accept :-)

  • user565493 Avatar

    i'm passing all basic and random tests except basic test #6. is there a way to see what that test is so i can figure out what i might be missing?