Ad
  • Custom User Avatar
  • Default User Avatar

    Thank you! Everything works

  • Custom User Avatar

    You can print the input to console.
    The assertion message shows you that you returned words which appeared 26 (xkplxopy), 21 (vbgj), and 21 (mfvitvken) times in the text while the expected top 3 words were nhflorve (29 times), xkplxopy (26 times, you got this one) and bfvymtvh' (23 times, note the apostrophe at the end).

  • Default User Avatar

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

  • Default User Avatar

    Understood, Thank you.

  • Custom User Avatar

    31 is a permutation, not a substring, the same with the others. You can't change the order of the digits, only take some of them next to each other.

  • Default User Avatar

    Hi there!
    Doing this kata, have a question:
    if we have string of integers and return the number of odd-numbered substrings that can be formed.
    and it's given an example such as "1341", they are 1, 1, 3, 13, 41, 341, 1341, a total of 7 numbers.
    while solveing it, I have got for the same string '1341' is more numbers of odd-numbering substrings
    1, 1, 3, 11, 13, 31, 41, 131, 141, 341, 1341 a total 11 numbers. Am I wrong any where? Please help

  • Default User Avatar

    Thank you) everything work well

  • Default User Avatar

    python fork

    changes:

    • copy input to user to avoid confusion when user mutates (this is why I am touching it to begin with)
    • remove redundant describes (only contained one it, describe is for grouping)
    • custom formatted error messages to include what the input was
    • replace parts of test generation with equivalent calls to the random module
  • Default User Avatar

    don't mutate the input

  • Default User Avatar

    Can anyone help me with this? I've passed 157 and failed 149 test. One an example from it.
    test_list=[2065, -349, 472, 70, -383, 173, -63, 192, 35, 89, -87, -74, 449, 256, -129, 298, 164, 85, -445, 441, 433, -170, 313, 360, 190, -449, -148, 67, 217, 80, -59, 146, 375, -24, -460, 0]
    I take:
    left=2065
    right=0
    left+right == sum (rest of list)
    2065 + 0 == 2065
    Therefore, must be return [left]+lst+[right]
    BUT it says that right is [-349, 472, 70, -383, 173, -63, 192, 35, 89, -87, -74, 449, 256, -129, 298, 164, 85, -445, 441, 433, -170, 313, 360, 190, -449, -148, 67, 217, 80, -59, 146, 375, -24, -460]
    Thank you)

  • Default User Avatar

    Thank you. will use question label.
    I've been confused by wording all elements to the right and greater so decide it mean sum.

  • Custom User Avatar

    The ISSUE label is for provable kata issues. Please use the QUESTION label when asking for help. See https://docs.codewars.com/training/troubleshooting#post-discourse.

    Nowhere in the description is mentioned that you should sum all the elements to the right.

  • Default User Avatar

    Hi all,
    Please can anyone explain me why for this test [16,17,14,3,14,5,2] shall be return [17, 14, 5, 2]. If in the description says that
    " dominant if it is greater than all elements to its right" All elements to the right.
    So how 17 can be greater than all elements to the right if 14+3+14+5+2 is 38. Or here need to apply some another way in comparsion.
    Thank you