Ad
  • Custom User Avatar

    [TypeScript]
    Consider using an assertion method that accounts for floating point errors (like closeTo or approximately), especially when the naïve solution can be resolved using trigonometric functions or the square root operator.

  • Custom User Avatar
  • Custom User Avatar

    Please use new python test framework.

  • Custom User Avatar

    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.

  • Custom User Avatar

    handle the division by zero error

  • Custom User Avatar

    second sample test case it is 45.11 not 45.10?

  • Custom User Avatar

    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.

  • Custom User Avatar

    Since we're talking money, your answer should be rounded to 2 decimal places

    Since we're talking about money, the answer SHOULD NEVER be rounded. And the actual/expected values should be tested for approximate equality.

  • Custom User Avatar

    There's already an abundance of katas where you have to "calculate the result of a given formula using given values".

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    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.

  • Custom User Avatar

    You will teach people to bad things with this kata, having classes doesn't meaning have oop. Remove public variable result and make method that execute operation return result directly.
    Correct signature of this method will be "double execute(double one, double another);

  • Custom User Avatar

    No explicit sample tests showing why they shouldn't just be separate classes that don't share the Operation base.

  • Custom User Avatar

    Please, help me understand:

    monthly interest rate r (divide yearly rate by 12)

    so this r is:

    • monthly or
    • yearly and divided by 12

    ? (and the same goes for N)

  • Loading more items...