Ad
  • Custom User Avatar
  • Custom User Avatar

    java: sample and full tests produce warnings

    I also have to question this one, I won't assert that it is definitely wrong but I suspect it is:

    -3 * 0 = 0 expected:<0.0> but was:<-0.0>

  • Custom User Avatar

    That's a warning, not an error, it probably does not stop you from doing anything.

    Maybe there's more text than that and part of it is an actual error?

  • Custom User Avatar

    Hi,

    I am having some trouble. I tried my solution in Java in eclipse and it works, but I am getting this error:
    STDERR:
    src/test/java/CalculatorTest.java:8: warning: [removal] Double(double) in Double has been deprecated and marked for removal
    assertEquals("3.2 + 8 = 11.2",new Double(11.2),Calculator.calculate(3.2,"+", 8));

    Thanks

  • Custom User Avatar

    Please DO NOT post solutions in discourse.

  • 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

    Please do not post solutions in discourse.

  • Custom User Avatar

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

  • Custom User Avatar

    Funny and quite mathy kata rather than technical.

  • Custom User Avatar

    oh? so in the case of 0x+b, the kata wouldn't require us to just raise b to the power of n

  • Custom User Avatar

    You can access solutions on the Solutions tab, if you're unable to solve this.

    Looking at your current code, why did you move it outside of the function? If you move it back inside, your code might work.

  • Custom User Avatar

    guys whats the answer

  • Custom User Avatar

    Tests do not necessarily test for "-1" being the coefficient of the term with the highest power of the variable (e.g. the x^3 coefficient of (-x+1)^3 is -1). In this case, my original code would have returned -1x^3 + ..., yet it passed because this case was not tested (I ran it again because I removed some print() statements, and then it failed).
    Brilliant kata, though—thanks!

  • Custom User Avatar

    Rust sample tests expect the function to be named expand_binomial, but the initial code and the full set of tests expect expand.

  • Loading more items...