Ad
  • Custom User Avatar

    I'm a bit perplexed. This didn't come with any tests, so I decided to simply run the program to see exactly what the incoming cards array looks like. In Ruby, when I simply print the cards incoming array, I get this:

    [[#, #, #], [#, #, #], [#, #, #], [#, #, #]]

    These aren't numbers, they just look like placeholders. What am I missing? Or is the code broken at this time?

    Thanks in advance.

  • Custom User Avatar

    My test for the data set

    [1, 2, 3, 4, 5, 6, 7, 8, 9],
    [2, 3, 4, 5, 6, 7, 8, 9, 1],
    [3, 4, 5, 6, 7, 8, 9, 1, 2],
    [4, 5, 6, 7, 8, 9, 1, 2, 3],
    [5, 6, 7, 8, 9, 1, 2, 3, 4],
    [6, 7, 8, 9, 1, 2, 3, 4, 5],
    [7, 8, 9, 1, 2, 3, 4, 5, 6],
    [8, 9, 1, 2, 3, 4, 5, 6, 7],
    [9, 1, 2, 3, 4, 5, 6, 7, 8]

    is passing, but per the tests should be failing. Why should this set fail?

  • Custom User Avatar

    Yes, sorry, now I understand. I just wasn't thinking about it the right way. Of course the variable n that is an argument into the method itself, when printed, can show you this. Thank you for your patience. I'm just learning to code again after being away from it for some years.

  • Custom User Avatar

    Giacomo, it's not my variable. It's yours. I presume you wrote the test. I can only see output from the test. I literally cannot see the test input. The test is 100% invisible to me. I only see the output of the test. Does this make any sense? The test is in the test suite, which I don't have.

  • Custom User Avatar

    I'm sorry, your question just doesn't make sense to me. I have a failing test, one perhaps that you wrote? I only see the problem when I run the test suite. I don't know how to view the input from the tests. If it can be done with puts, no problem, but puts ___ what?

  • Custom User Avatar

    Yes, one can print just about anything with puts. What I want to know is, what is the input value? Someone claimed it is 59884848459853. Is this true? How can we know?

  • Custom User Avatar

    Thanks for that. Where did you get the input value from? Did you derive it, or is it published somewhere?

  • Custom User Avatar

    I too am having a problem with one of the tests with Ruby. The report I get back is:
    Expected: 59884848483559, instead got: 59884848534589.

    This seems to be the same or similar test that failed for other users, perhaps in a different language. However, I don't know what the original input is supposed to be. Could we please examine this one and see if the test needs to be updated for Ruby? My code works for all other examples. Thank you!