Ad
  • Default User Avatar

    Yeah, I was confused at first at where the initial caps came from in this answer, but when I ran it locally, I saw it doesn't. Not sure what "Should -Be $var" is in the tests, but I susped an -eq needs to be swapped with a -ceq, or swapped with a $userAnswer.Equals($testAnswer).

    Or maybe we're assuming too much from the kata description. It never specifically states each section needs to start with a caps, but every example consistently does, and that's all the instruction given.

  • Default User Avatar

    Nice to see a pipeline in powershell. No handling of upper and lowercase though. Think the question had leading caps but I guess they didn't test on that?

  • Custom User Avatar

    That is a valid solution. The Python translation has been updated accordingly, thanks.

  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

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

  • Custom User Avatar

    I suggest reducing the number of hacks to minimum and make sure that your basic k-means algorithm handles short tests well.

    When this kata was created, scipy was not available here on CodeWars, so there was no "usual implementation", so the original solution has k-means implementation of its own, and it was a kind of a point.

    Maybe it's worth quoting the kata description: "if you have trouble discerning if the particular sequence of 1's is a dot or a dash, assume it's a dot".

  • Default User Avatar

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