Ad
  • Custom User Avatar

    Hello! Try writing solutions for smaller arrays on paper (Note that there are many solutions). Some of them will help you find the pattern

  • Custom User Avatar

    count is very inefficient: each time you use it, it needs to parse the whole object it is applied to. There are much better alternatives in Python (make a smart research online and you should find it); there may be other points to enhance or change in your code, though.

    See there to format your code: https://docs.codewars.com/references/markdown/#code-block

  • Custom User Avatar

    Please print the input value with the test result, otherwise you'll never know what's wrong.

    Python Completions 4844

    If a problem with the tests existed, somebody would have noticed before.

    Your code is failing this sample test, you can see the expected answer is ok, your code is wrong:

    test.assert_equals(rot13("@[`{"), "@[`{")
    

    There is no n in the input, your code is returning '@[`n'

  • Custom User Avatar

    All I can say is the ASCII value for 'z' is 122

  • Custom User Avatar

    The error message is like this: your wrong answer should equal the expected value. To see the input values, print them.

  • Default User Avatar

    my python returns true, if i do:
    1/5 == 0.2

  • Custom User Avatar

    Because that's how floating point arithmetic work, not only in Python.

    Helper question: how much is 1/5 in Python? Hint: its not 0.2.

  • Custom User Avatar

    Which language/test are you talking about?