Ad
  • Default User Avatar

    First of all, thank you very much for your detailed answer!

    I think you are right about your three points.
    [1] The parameter/variable names are changed to hyphen conventional symbol names.
    [2] I have refactored the example test to be (hopefully) much clearer.
    [3] Invalid input values are now ignored.

    By the way: I also took this opportunity to add a random test.

  • Custom User Avatar

    I am also interested in this rationale.

  • Default User Avatar

    exactly i struggled so hard with this i was trying some nested loops to loop over rows than numbers and other bullshit, didnt work. Then i looked at solutions and was smiling that it is that simple if u know math for this kind of a problem

  • Custom User Avatar

    codewars should implement a "tag" system, so people can tag it as a joke, goof, annoying or whatever, and people that aren't here for this can just filter and avoid it completely.

    There are tags on Codewars. They do not work well, that's true, but this kata already has puzzle (i.e. annoying joke) tag.

  • Default User Avatar

    'If "This is not about coding skills", it should not be in "codewars".'
    I disagree. Programming isn't only about coding skills. Making assertions about what the return of a function can look like is an important part of it.
    This kata forces you to either do a lot of unnecessary work or make clever assertions and make your life easy.
    But I agree that it shouldn't be 8 kyu.

  • Default User Avatar

    You have already an answer by Chrono7.

    did those 6 completions used the current Racket 7.2 or another version?

    They used 7.2; the tests were the same.
    I verified your examples with Python. I get the same results as with Racket.

  • Custom User Avatar

    epsilon = 0.1 actual = (3 3.4666666667) expect = (10 3.0418396189)

    With only 3 iterations your value is far from PI with a given precision of 0.1.

  • Custom User Avatar

    The spec says, "Fix the variable assignments." They are fixed. It does not say you must concatenate two strings to form a third.

  • Default User Avatar

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

  • Custom User Avatar
  • Custom User Avatar

    5/9 == 0 in python2. Use 5.0/9 instead.