Ad
  • Custom User Avatar

    that's rather your comment that makes absolutely no sense.

    • "user should handle infinite sequences", okay...
    • "next_item(count(2,5), 3) makes no sense" ...tf!? :o It's an inifnite sequence. This should return None. Period. And ofc it's identifiable if the generator will generate the item or not assuming that the generators aren't random (but that's more work).
    • "we have no way to determine whether the generator never produces the desired value." -> assuming you're talking about a random generator? But then you have no idea of what will do ANY generator that you'll get as input, so infinite generators shouldn't be tested at all. count(2,5) isn't random. range neither is and is tested with steps too. count(2,5) is just the mix of the range tests and the presence of count in there, so there is no reason to not test for it, with both items present in the sequence and missing. To not do so because it's problematic (to what I'd agree, especially considering the current rank) requires more specifications in the description so that the user knows what he's facing.
    • next sentence: "yeah to be complete we should test count with a step". The fuck why my suggestion is invalid, then?

    In any case, if count is tested, that should be in the description that infinite sequences may occur. And if the tested step is only one, that should be told too.

    And about the rank: are you so much desperate to think about yourself as intelligent that you need (...like some other users) to (try to) put down any other user? Seriously, that's just boring... Or can't you identify a task for what it requires as knowledge rather than only for the implementation it needs? (we already have one like that, that's enough, imo)

    Even if a simple for loop is enough (...=> count(2,5)...? cough ), to find how to do that require to know about iterators. Add count to that and you need to find a way to avoid list(xs), which is what every "beginer" will try first (1)...and get no feedback about what the problem is / 2) ""beginer"" because real beginers won't even have a clue about what to do). So no, it's not 8 kyu. I'm not saying this should be yellow, but it's definitely not 8 kyu.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    that doesn't change that the test about count is either inapropriate or unsufficiently tested, and that the rank is completely inappropriate for such a task.

  • Custom User Avatar

    Generators are tested in JS as well.

    Edit: the description says "Given a sequence of items", so I have to agree with Unnamed that generators could be tested as well.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Why the F... iterators are tested in the python version?

    1. nothing is told about that in the description
    2. that doesn't fit an 8 kyu challenge.
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution