Ad
  • 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