Ad
  • Default User Avatar
  • Default User Avatar

    I agree.

  • Default User Avatar

    Test cases still borken for python.

  • Custom User Avatar

    Which language? I can't find substantial code, other than a function/method definition template.

  • Custom User Avatar

    The description says:

    • A "word" is a sequence of alphabetical characters. By this definition, if there is a hyphen (eg. "elephant-ride"), this will produce two, one on either side (eg. "elephant" and "ride").
    • The abbreviated version of the word should have the first letter, then the number of removed characters, then the last letter (eg. "e6t-r2e").

    With the example shown above, is that not clear enough?

    As for your examples, here's how they should work:

    maybe the tests are just bad because it also tells me balloon'doggy => b5n'd3y, and "Input: monolithic, is'sits'is: a; balloon-monolithic, : 'm8c is s2s is a b5n-m8c' should equal "m8c, is's2s'is: a; b5n-m8c," which from the description seems wrong.

    x = word is too short; do not convert
    - = word is long; convert
    
    balloon'doggy
    ------- -----
    b5n    'd3y
    
    result:  b5n'd3y
    
    
    monolithic, is'sits'is: a; balloon-monolithic,
    ----------  xx ---- xx  x  ------- ----------
    m8c       , is's2s 'is: a; b5n    -m8c       ,
    
    result:  m8c, is's2s'is: a; b5n-m8c
    

    Does that help?