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.
[TypeScript]
Consider using an assertion method that accounts for floating point errors (like
closeTo
orapproximately
), especially when the naïve solution can be resolved using trigonometric functions or the square root operator.This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/155.
Please join the discussion to help us identify duplicate kata and retire them.
D Translation
Ruby 3.0 should be enabled.
KaTeX should be used.
Please use new python test framework.
Clojure Translation ready for review
I got this error message.
Expected: equal to 1264.14
Actual: 1264.14
I don't understand what's a problem. I returned correct value, a I can see.
handle the division by zero error
second sample test case it is 45.11 not 45.10?
This Kata is good for improving the fundamentals of a language especially how precedence and operators. The question is a no-thinker, direct application of formula is all it takes.
Since we're talking about money, the answer SHOULD NEVER be rounded. And the actual/expected values should be tested for approximate equality.
There's already an abundance of katas where you have to "calculate the result of a given formula using given values".
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
First of all, you should not access the result variable dirctly by having it public but instead use a private variable with a get method which only returns the value of the result variable, espacially when working with inheritence.
Secondly, I saw that you named the result variable as Result with a capitalized R instead of using all lowercase as in the other languages. I missed that while reading the description and used the C# variable name while trying to solve it in Java which of course resulted in an error. I can't see a strong argument for not having the same variable names between languages so that is something I think should be corrected.
If you think I'm wrong on any point please let me know why, it's always fun to learn something new.
Otherwise I think this was a great introduction to inheritance at least for Java (as that is the language I'm most familiar with and have taken a few courses in), so thanks for that.
Loading more items...