7 kyu

Noisy Cell Counts

498 of 1,100amiller.phys
Description
Loading description...
Arrays
Logic
  • Please sign in or sign up to leave a comment.
  • TooFaeded Avatar

    Python tests are not functional. Some of the "correct" answers involve lists that have lower values at a greater index that some of the previous values.

  • Lachuchacaliche Avatar

    somebody can help me? so i try mi code in google colab and the answer its okay, but in my test the program says me "the function give [2,2,1,2,2] and should be equal to [2,2,2,2,2] but when a run in colab this same example the program its right.

  • JohanWiltink Avatar

    LC translation

    this translation modifies the description

  • Artyr9Ik Avatar

    This comment has been hidden.

  • disel889 Avatar

    Either I didn't understand the assignment, or I'm doing something wrong, Help please Here's what the random test gives out: input array was modified: [2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 6, 6, 7, 7, 7, 7, 7, 7, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11] should equal [2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 5, 6, 6, 7, 7, 7, 7, 7, 7, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 9, 11, 11, 11, 11, 11, 11, 11, 11]

    should equal [2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 3, 5, 6, 6, 7, 7, 7, 7, 7, 7, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 9, 11, 11, 11, 11, 11, 11, 11, 11] goes away from the logic of the task...

    how is it?????(python)

  • dj4free Avatar

    Every other test //random errors (18 of 36 Assertions)// fails in error: //input array was modified: [10, 11, 11] should equal [10, 11, 10]// in Python

  • JohanWiltink Avatar
  • trashy_incel Avatar

    input array should be const-qualified in C. Also why not use the array notation ?

  • dfhwze Avatar

    Haskell includes empty input, other languages do not.

  • dfhwze Avatar

    C++ ref sol incorrect:

    Expected: equal to [ 27, 27, 27, 27, 28, 28, 28, 27, 27, 27, 28, 28, 28, 27, 27, 27, 28, 28, 28, 27, 27, 27, 28, 28, 28, 27, 27, 27, 28, 28, 28, 27, 27, 27, 28, 28, 28, 27, 27, 27, 28, 28, 28, 27, 27, 27, 28, 28, 28, 27, 27, 27, 28, 28, 28, 27, 27, 27, 28, 28, 28, 27, 27, 27, 28, 28, 28, 27, 27, 27, 28, 28, 28, 27, 27, 27, 28, 28, 28, 27, 27, 27, 28, 28, 28, 27, 27, 27, 28, 28, 28, 27, 27, 27, 28, 28, 28, 27, 27, 27, 28, 28 ]
    Actual: [ 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28 ]
    
  • 66  Avatar

    Please review: C++ Translation

  • JohanWiltink Avatar
  • JohanWiltink Avatar

    I'm not familiar with Python kata, but should the example tests have an import solution and an it header like the submit test suite does?

  • JohanWiltink Avatar

    Test suite has wrong indents, rendering with errors in the editor.

    That is a maintainability issue.

  • JohanWiltink Avatar

    I told you not to resolve that issue until changes had been reviewed.

    That assertion needs a failure message. You are not testing what solver may expect. "But [10,11,10] is not the correct answer according to the description!" is a very logical reaction when the assertion failure message is

    [10, 11, 11] should equal [10, 11, 10]
    

    and solver has not read or does not understand the it header.

  • JohanWiltink Avatar

    solver is not getting a copy of the input in random tests.

    this becomes important when order of arguments to assert is fixed.

    ETA: to be sure to be sure, ( also ) calculate expected before calculating actual.

  • JohanWiltink Avatar

    Arguments to assert_equals are in wrong order in random tests

  • rowcased Avatar
  • JohanWiltink Avatar

    Issue to prevent approval while the kata is being modified for input non-mutation.

    Please resolve when this has been implemented and reviewed ( and not before ).

  • rowcased Avatar

    I think it's a worthy consideration to at least comment on whether the input should or should not be mutated, or whether it matters. Given that it is generally considered a bad practice, I suggest that the user NOT be allowed to do so.