Ad
  • Custom User Avatar

    Your latest solution is wrong because

    • You use index to check positioning of the corresponding word to replace, this will fail if the title contains 2 or more identical space-separated words (same casing as well)

    • You're checking whether word in title is also part of a sub-word in minor_words instead of individual words there

  • Custom User Avatar

    Your code will compare numbers against itself (which fails for cases when n = 0) since the diff between a number and itself is always 0

  • Default User Avatar
    There will be a preloaded dictionary dict_scores with all these values: dict_scores["E"] == 1
    

    This is from the instruction.

  • Custom User Avatar

    In this kata, a difference seems to be defined as non-negative integer. So, there are no pairs when a negative n is given. And also, think carefully for n==0 case (e.g. lst=[1,1,1],n=0). When you want to check the input values, try to add a temporary code like "print(lst,n)"

  • Default User Avatar

    yes, i am also having this issue. i don't know to pass test. because i don't know the problem with my code

  • Default User Avatar

    It simply doesn't exist there. You'd need to print dict_scores from the kata, then copy / paste it into your foreign environment.

  • Custom User Avatar

    with values between 0 and 255, inclusive.

    No, 256.1.2.3 is not valid

  • Custom User Avatar

    No, it isn't. Read the posts below as it was already explained more than once there.

  • Custom User Avatar

    Python Completions 22706

    100% sure it's a problem with your code. Are you printing the result or returning it?