Ad
  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    I don't think it's a great idea to hide the test cases, especially if it turns out that the test cases are wrong. Aside from that, hiding the test cases is an act that totally contradicts a TDD approach. The TDD approach is, of course, based on total disclosure of what the tests are about.

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    I got "10 should equal 9" on Test #5 when I submitted my run.

    This is because assertion #5 is wrong. It should say

    test.assert_equals(levenshtein("nayvyedosf","sjxen"), 10)
    

    and absolutely not

    test.assert_equals(levenshtein("nayvyedosf","sjxen"), 9)
    
  • Custom User Avatar

    I opened Firefox :)

  • Custom User Avatar

    This algorithm ("get the equation of a line from a sequence") passed the tests. However, the submission failed with an "unknown error":

    def get_function(sequence):
        slope = sequence[1] - sequence[0]
        intercept = sequence[0]
        if slope == 0:
            return 'f(x) = '+str(intercept)
        elif (slope == 1)and(intercept == 0):
            return 'f(x) = x'
        elif intercept == 0:
            return 'f(x) = '+str(slope)+'x'
        else:
            return 'f(x) = '+str(slope)+'x'+ ' + '+str(intercept)
    
  • Custom User Avatar

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