Ad
  • Custom User Avatar
  • Custom User Avatar

    i like this solution a lot. i can clearly visualize each line and what it represents. some other solutions posted may seem elegant but they really are just concise to the point of incomprehensibility. thank you for this

  • Custom User Avatar

    I had to test, did not think this would work for the value 0 - it does

  • Custom User Avatar

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

  • Custom User Avatar

    As Jim Hartnett wrote one month ago in general discussion section:
    The sample test for python is broken. expect_equals needs to be assert_equals instead, and the answer should contain one more space.

  • Custom User Avatar

    The task was great, the exercise not that great. The format for the results should IMO be a list rather than a string. Consider terms "55-5" => "555-" and "5-55" ==> "555-"...
    Expecting a list for the result would enable one to re-use the same code for the calculator-kata, and later for the interpreter.
    Also it would be nice to test some error handling, e.g. define error strings for missing paranthesis or some other malformed terms.

    Anyway, I worked around it by converting the list into a string at the end of the function in order to accommodate the exercise when a certain flag is set, otherwise it returns the list.
    Again, thanks for the task :-)