Ad
  • Custom User Avatar

    (Java) fixed at some point

  • Custom User Avatar

    Thanks. Corrected :)

  • Custom User Avatar
  • Custom User Avatar

    In all case it is said that you must return a string in the form : "Buy: b Sell: s", so it is also the case when the given string is empty ! (with b and s convenient).
    It is also said that:
    "To ease the stockbroker your task is to produce a string of type "Buy: b Sell: s" where b and s are 'double' formatted with no decimal"
    So if your result is "181845.99999999997" you have to take the usual rounding, no?

  • Custom User Avatar

    Remove the "static" from the test
    This too should be fixed

  • Custom User Avatar

    I didn't get you. What do you exactly mean by "correct output format"?

  • Custom User Avatar

    Yes as said in the examples of the description there are whitespaces before ";". Sometimes brokers don't know very well the rules of punctuation:-)

  • Custom User Avatar

    As said in the description like the other tests:
    Test3 and Test6 expect a string in the form
    "Buy: b Sell: s" where b and s are 'double' formatted with no decimal, b representing the total price of bought stocks and s the total price of sold stocks so I don't understand why you got "expected: but was:".
    The alternative in some tests being:
    "Buy: b Sell: s; Badly formed nb: badly-formed 1st simple order ;badly-formed nth simple order ;" when orders are not well formatted.
    Maybe you could try anew, codewars seeming sometimes busy and tell me if you can complete the kata.

  • Custom User Avatar

    I fell over the same thing. Given the formula, x should be undefined when a is zero.

  • Custom User Avatar
  • Custom User Avatar

    Cool. Could you mark it as "resolved" for me then, please?

  • Custom User Avatar

    Does that answer your question?

  • Custom User Avatar

    Effectively, 0x^2 + 2x + 3 == 2x + 3. In cases where one or more term = 0, x's value should still be found and returned, though maybe you don't need the quadratic formula for that. /hint hint/