5 kyu

Typoglycemia Generator

240 of 847trip
Description
Loading description...
Fundamentals
  • Please sign in or sign up to leave a comment.
  • ahmet_popaj Avatar

    Nice kata, well done.

  • narjo Avatar

    This comment has been hidden.

  • George25 Avatar

    :There are many errors in the solution to the last sample, indicated by '*':

    "you've gotta dacne like teehr's nbdooy wachintg, love like ylo'ul neevr be hrut, sing like teehr's nbdooy leiinnstg, and live like it's haeevn on earth."
     *      *           *                             *    *                          *    *                             *    *    *                   *
    
  • user7154500 Avatar

    Great kata!

  • Pablo Vent  Avatar

    in the following test cases:

    scramble_words('-dcba') == '-dbca'
    as first char is "-" and last "a", shouldn't return value be "-bcda"?

    scramble_words('dcba.') == 'dbca.'
    as first char is "d" and last ".", shouldn't the return value be "dabc."?

    Since the first and last characters remain in original place for each word. Thanks for any clarifiaction.

  • joelbarton.io Avatar

    It would be nice if there was an additional test case that deals with words that have both a leading/trailing special character and an internal special character. None of the current test cases deal with this scenario but it comes up in the random tests.

  • ejini战神 Avatar
    • Python new test framework should be used (Refer this & this for more detail)

    • Ruby 3.0 should be enabled (Refer this & this for more detail)

  • mwk48 Avatar

    Nice kata:)

  • aeliz Avatar

    This test failure is a bit confusing to me, given that the kata description requires that we keep the punctuation in its original location, which is opposite to what this expected value would suggest. It looks like these 'random value' test cases are expecting all the punctuation to be deleted.

    Are we supposed keep punctuation in its original location in some situations, but not others?

    I'd love to know if there's something obvious I'm missing in my understanding of the problem so I can solve the problem properly. Thanks! :)

    TEST: "Testing for "you're codewars blink, eat jiggery-pokery callipygian four dice in"

    It should work for random inputs too -
    Expected: "yorue cadeorws bilnk eat jeeggikoprryy caagiillpyn four dcie in",

    instead got: "yor'ue cadeorws bilnk, eat jeeggik-oprryy caagiillpyn four dcie in" "

  • swanf Avatar

    It's it not possible to use the string.matchAll function in this compiler? I got "TypeError: word.matchAll is not a function" when calling a matchAll function. It's kinda tricky.

  • CrystalDime Avatar

    I dont understand what critera the full setences are supposed to be sorted under. They don't seem to follow the rest of the guidelines in the test cases.

  • sepi Avatar

    I can't complete this one because something strange happens when switching between the static and random tests. Somehow my code seems to try to call a str.

  • Tristik-js1404 Avatar

    Not a clear enough description of how the scrambling should handle symbols, e.g. I expected -dcba to scramble to -bcda instead the solution wanted the first 'alpha character' to remain in place not the first 'character' to remain in place.

  • Tristik-js1404 Avatar

    Must handle special character at the start is not specified in the instructions I would expect -dcba to equal -bcda

  • GiacomoSorbi Avatar

    Thanks for the kata; I have just translated it into both Ruby and Python, if you wish to approve them :)

    May I add my random tests to the JS version too and suggest to use the .assertEquals method instead of "expect", as it gives much more informative error messages?