Ad
  • Custom User Avatar

    This one was pretty good to review how to deal with boundary issue. Great job!

  • Default User Avatar

    I'm not sure if I just got lucky but I used a sum variable rather than calling the array and that seemed to do the trick. Soo try calling the array less often when doing math?

  • Custom User Avatar

    This was a nice exercise for C#. It allows one to explore a bit more arrays, which I seldom use.

    I did run into the problem with the precision point issue in the random tests. I kept submitting until it worked, as it was suggested by in the comments.

    Shouldn't there be a way in the test to reduce the expected precision in the answer?

  • Custom User Avatar

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

  • Default User Avatar

    The verbatim replies from the description ("You are ... year(s) old." etc ) will fail the test, since they do not account for singular/plural -- can the description be amended? The test cases (that have the required wording) are cut off on small windows/screens, so it's hard to see it there.

  • Custom User Avatar

    So I ran into this weird behavior. For some reason the test was reporting expected as actual and vice versa. This made it difficult to see what the problem was. I kept matching the answer to the string that said what was expected, but it kept failing.

  • Custom User Avatar

    I am seeing the same problem.

  • Default User Avatar

    Thank you for your gracious response :)

  • Custom User Avatar

    You are right, it was not generating unique values; normally, I would say "my bad", but it seems like it saved a previous version of my work, as I see that the Python tests are also lacking a part.

    Thanks for your feed!

  • Default User Avatar

    There may be an issue with the ruby grader.

    The instructions say that the numbers will be unique. I am seeing repeating numbers in the random array tests.

    This was one of the random arrays that it generated
    [-3, 0, -9, -1, -8, -4, 3, 6, -2, 0]

    No big deal. I sorted it and used .uniq() on it.

    Yet it failed in the random tests because it expected 6, yet my code gets 7.

    Hand sorted and taking away the redundant zero, this array lines up like
    [-9,-8,-4,-3,-2,-1,0,3,6]

    So
    We need 3 digits from -8 to -4, -7, -6, -5.
    We need 2 digits from 0 to 3, 1, 2
    We need 2 digits from 3 to 6, 4, 5

    That seems to be 7 digits.

    Yet I can be wrong. It would be that I am not considering a scenario.