• Basically the line breaks serve to visually structure the final string, so there is no need for one at the end.

  • Here is the first sample test which shows an expected result having no trailing space. Following that, we can see the results of running your code which shows that you returned first, and then finally what is expected of the test. Your code is definitely producing a trailing \n, and the kata tests are correct.

    Test.assert_equals(multi_table(5), '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')
    
    '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\n'
    #should equal
    '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'
    
  • I am facing that same problem...

  • There's no issue here. All you have to do is read the error message that shows your code is returning the string with a trailing \n but the expected result does not have that, as discernable by the sample tests. Ergo, your foreign testing environment expects the wrong result.

  • maybe you need to import math module first?

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

  • It's a problem with your code, why are you using *arr?

  • Just read the error messages :P You misstyped some words. 'Velkmost' should be 'Velkomst' and 'Luakiamas' should be 'Laukiamas'.

  • I'm not positive which language you're referring to, but I assume you're referring to setting the default value. Only margin is meant to be optional. You're not required to set defaults for a and b, but you're also not tested on it as all test cases should provide a and b.