Ad
  • Custom User Avatar

    now also on dart
    Translation Dart

  • Custom User Avatar
    Expected : "1 * 5 = 5\n 2 * 5 = 10\n
                           ^ this space is never in expected
    
    Expected : "1 * 5 = 5\n 2 * 5
                    ^   ^       ^  this one is 5 
    Got : "1 * -40 = -40\n 2 * -40
               ^^^   ^^^       ^^^ but this is -40?
    

    I guess you also made those changes in the note app then.

  • Custom User Avatar

    I've just erase the "instead" on my note app ^^

    @Chrono, it works thank you :)

  • Custom User Avatar

    I don't see how you could possibly obtain this error message

    Expected : "1 * 5 = 5\n 2 * 5 = 10\n 3 * 5 = 15\n 4 * 5 = 20\n 5 * 5 = 25\n 6 * 5 = 30\n 7 * 5 = 35\n 8 * 5 = 40\n 9 * 5 = 45\n 10 * 5 = 50
    
    Got : "1 * -40 = -40\n 2 * -40 = -80\n 3 * -40 = -120\n 4 * -40 = -160\n 5 * -40 = -200\n 6 * -40 = -240\n 7 * -40 = -280\n 8 * -40 = -320\n 9 * -40 = -360\n 10 * -40 = -400"
    

    that is not at all what the error messages look like when I run it, for example, you've written "Got :" with two line terminators before it, while the actual output is ", instead got:" with no line terminator, and the expected one is 5 while got is -40, a closing double is missing, spaces appearing out of nowhere ..

    this is what they do look like:

    Expected: "1 * 5 = 5\n2 * 5 = 10\n3 * 5 = 15\n4 * 5 = 20\n5 * 5 = 25\n6 * 5 = 30\n7 * 5 = 35\n8 * 5 = 40\n9 * 5 = 45\n10 * 5 = 50", instead got: " 1 * 5 = 5\n 2 * 5 = 10\n 3 * 5 = 15\n 4 * 5 = 20\n 5 * 5 = 25\n 6 * 5 = 30\n 7 * 5 = 35\n 8 * 5 = 40\n 9 * 5 = 45\n 10 * 5 = 50"
    
  • Custom User Avatar

    I copied and pasted your code, removed the space at the end, and passed both sample and attemp tests.

  • Custom User Avatar

    Thank you Chrono, but i've already this option (has many others) and it doesnt work.

  • Custom User Avatar

    Remove that space you've added at the end, and your code will pass.

  • Custom User Avatar

    seems to be impossible to resolve with ruby :/
    I've test every possible options...
    But on every i'm turning between those results :

    Expected : "1 * 5 = 5\n 2 * 5 = 10\n 3 * 5 = 15\n 4 * 5 = 20\n 5 * 5 = 25\n 6 * 5 = 30\n 7 * 5 = 35\n 8 * 5 = 40\n 9 * 5 = 45\n 10 * 5 = 50

    Got : "1 * -40 = -40\n 2 * -40 = -80\n 3 * -40 = -120\n 4 * -40 = -160\n 5 * -40 = -200\n 6 * -40 = -240\n 7 * -40 = -280\n 8 * -40 = -320\n 9 * -40 = -360\n 10 * -40 = -400"

    or

    Expected : "1 * 38 = 38\n2 * 38 = 76\n3 * 38 = 114\n4 * 38 = 152\n5 * 38 = 190\n6 * 38 = 228\n7 * 38 = 266\n8 * 38 = 304\n9 * 38 = 342\n10 * 38 = 380"

    Got : "1 * 38 = 38\n 2 * 38 = 76\n 3 * 38 = 114\n 4 * 38 = 152\n 5 * 38 = 190\n 6 * 38 = 228\n 7 * 38 = 266\n 8 * 38 = 304\n 9 * 38 = 342\n 10 * 38 = 380"

    Once it doesnt wants the space after the results, and the next time it wants it.

  • Custom User Avatar

    It looks like you might be overwriting the expected result in memory, there is no issue with the tests.

  • Custom User Avatar

    Isn't the following expectated result wrong?

    random_tests
    for matrix:
    {
    {-48, 34, -42, 20, 40, -77, -53, 32, 57, 38},
    {-34, -80, -3, -7, -12, 37, 83, -92, 3, -44},
    {47, 44, -8, -14, -86, -95, -48, -44, 71, 29},
    {-54, -77, -38, 5, 43, -98, 28, 91, 34, -15},
    {29, -100, 5, -74, -7, 94, 63, -24, -99, -34},
    }

    expected:
    38,5,43,-98,28,91,34,-15
    29,-100,5,-74,-7,94,63,-24,-99,-34

  • Custom User Avatar

    Enabled in this fork

  • Custom User Avatar

    Updated to Node 18

  • Custom User Avatar

    Fixed (remember that you need to RESET the trainer to get the fixed code).

  • Custom User Avatar

    JavaScript sample tests do not import chai.

  • Custom User Avatar

    No, your code is just keeping track of which indices are even, not their respective actual array values.

  • Loading more items...