Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
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.
I am also interested in this rationale.
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
There are tags on Codewars. They do not work well, that's true, but this kata already has
puzzle
(i.e. annoying joke) tag.'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.
You have already an answer by Chrono7.
They used 7.2; the tests were the same.
I verified your examples with Python. I get the same results as with Racket.
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.
The spec says, "Fix the variable assignments." They are fixed. It does not say you must concatenate two strings to form a third.
This comment is hidden because it contains spoiler information about the solution
Done!
5/9 == 0
in python2. Use5.0/9
instead.