7 kyu
n-Bonacci Ratio
230 of 350beniolenio
Loading description...
Mathematics
Algorithms
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
python new test framework is required. updated in this fork
COBOL translation.
approved
Edited
The brand spanking new JavaScript translation uses Node and test framework versions from yesteryear. Missed a chance there. I'd suggest upgrading.
I wasn't the one who made it. I just approved it because I saw nothing wrong with it. Is this mistake really egregious enough that I should delete the translation?
No, not that.
What FArekkusu wrote about, is that you need to use built-in
test.assert_approx_equals
, instead oftest.assert_equals
that compares toTrue
. See here: https://github.com/Codewars/codewars.com/wiki/Codewars-Python-Test-Framework-V2#approximate-equality-testWith that, rounding becomes redundant, and it really gives nothing to the kata, so it should be removed.
Thank you :) As of ~a week ago it has compared for approximate equality, but not using assert_approx_equals. I'll be fixing that now.
Nothing was fixed.
You're going to need to tell me what is wrong with them for me to fix them.
Ok, then.
The tests are wrong, and built-in functionality for approximate comparison should be used.
How are the tests wrong? And how do I compare for approximate equality any other way?
Also, the tests are not wrong. They seem to work fine.
The values should be compared for approximate equality, and not rounded.
Why? And how would you do that with test.assert_equals? All I can think of is test.assert_equals(True, n_bonacci(n) > x and n_bonacci(n) < y)
Nevermind. I did it. ☺