Ad
  • Custom User Avatar

    OP solved it, closing

  • Custom User Avatar

    OP solved it, closing

  • Custom User Avatar

    OP solved it, closing

  • Custom User Avatar

    sorry, but your code is wrong, regardless of what happens offsite. the test example I gave is easy to follow. the kata tests are not flawed

  • Custom User Avatar

    So, to be clear what you mean to say is: if you use the test example I showed you on your machine, your code returns 7, but the exact same code returns -1 on Codewars?

  • Custom User Avatar

    What you really need to do is take the input from a failed test and put that in your machine, for example (you can easily see this is a correct test):

    test.assert_equals(wheres_wally("Walley Wally, Wally- Wally: Wally+ Wally:"), 7)
    

    ...from there you have a means to debug.

    In the future, only post as an issue is you can prove a problem with the kata, otherwise post as a question.

  • Custom User Avatar

    Compare words (groups of words) separated by a comma. Also, when comparing, you must take the case of letters into account, even though the description says otherwise. The lexicographic sorting is also unnecessary if the letters match.

  • Custom User Avatar

    Well, that's what you thought it was, read it again after you got what to do, propose a better wording. Or maybe some examples in the description would clarify it better?

  • Custom User Avatar

    Not a kata suggestion

  • Custom User Avatar

    What you get is:

    Testing:
    Alexis:Wahl;John:Bell;Victoria:Schwarz;Abba:Dorny;Grace:Meta;Ann:Arno;Madison:STAN;Alex:Cornwell;Lewis:Kern;Megan:Stan;Alex:Korn
    (['ARNO', 'ANN'], ['BELL', 'JOHN'], ['CORNWELL', 'ALEX'], ['DORNY', 'ABBA'], ['KERN', 'LEWIS'], ['KORN', 'ALEX'], ['META', 'GRACE'], ['SCHWARZ', 'VICTORIA'], ['STAN', 'MADISON'], ['STAN', 'MEGAN'], ['WAHL', 'ALEXIS'])
    ACTUAL =
    None
    EXPECT =
    (ARNO, ANN)(BELL, JOHN)(CORNWELL, ALEX)(DORNY, ABBA)(KERN, LEWIS)(KORN, ALEX)(META, GRACE)(SCHWARZ, VICTORIA)(STAN, MADISON)(STAN, MEGAN)(WAHL, ALEXIS)
    False
    None should equal '(ARNO, ANN)(BELL, JOHN)(CORNWELL, ALEX)(DORNY, ABBA)(KERN, LEWIS)(KORN, ALEX)(META, GRACE)(SCHWARZ, VICTORIA)(STAN, MADISON)(STAN, MEGAN)(WAHL, ALEXIS)'
    
  • Custom User Avatar

    not a kata suggestion

  • Custom User Avatar

    Thank you!

  • Custom User Avatar

    No, a and b are two separate elements in the array, you can't use a single element which has both like you wrote.

                    V                          V          
    Log [1, -4, -5, 3, -2, 11, 23, -76, 6, -7, 2] 2 3 True should equal False
                  V  V
    Log [1, 4, 5, 3, 2, 7, 6, 23, 76, 11, 0] 2 3 Test Passed 
    
  • Custom User Avatar

    You should not overlap the prefix and suffix.

    There's an overlap here:

    aaaa
    aaa   prefix
     aaa  suffix
     ^^ overlap
    
  • Custom User Avatar

    This kata is really easy. If you spend a lot of time on it it's just you're probably just missing the point and it doesn´t worth it. A good choice in those cases is just to move on to other katas. You may come back to it later and maybe you will solve it in a snap then.

  • Loading more items...