Granted, the link will tell everything you need and more, but a sentence something along the lines of "two numbers have the golden ratio if their ratio is the same as the ratio of the sum of the two numbers to the larger number, and its value is 1.618 to three decimal places." would improve the kata, I think.
(Just realised I've created this as an issue, rather than a suggestion. Sorry.)
Yeah that's very confusing.
Duplicate.
No fixed tests.
It still shows in-place modification.
Fixed, thank you!
Fixed, Thank you!
Don't use
Test.expect
.The example in the description is wrong.
Missing tests with cyclic replacements (like
Test.assert_equals({a: 1, b: 2}.replace_keys({a: :b, b: :a}), {a: 2, b: 1})
). Incorrect solution: https://www.codewars.com/kata/reviews/5e42e6a624428a0001b2cd43/groups/5e42e6a624428a0001b2cd45Missing tests with falsy values. Incorrect solution: https://www.codewars.com/kata/reviews/5e42e6a624428a0001b2cd43/groups/5e42e88d24428a0001b2cd74
Sample tests:
This should have been a Suggestion, rather than an Issue, so marking it as resolved.
Granted, the link will tell everything you need and more, but a sentence something along the lines of "two numbers have the golden ratio if their ratio is the same as the ratio of the sum of the two numbers to the larger number, and its value is 1.618 to three decimal places." would improve the kata, I think.
(Just realised I've created this as an issue, rather than a suggestion. Sorry.)
Loading more items...