Ad
  • Custom User Avatar

    From Voile's post below, that operation translates to this:
    0 / 117 -> 0 / 89 -> 0
    Actual and expected seems to be flipped on some tests.

  • Default User Avatar

    I don't understand why no one responding to my queries / issues.

    FluentCalculator::init()->dividedBy->dividedBy->times->dividedBy->zero->one->one->seven->plus->dividedBy->eight->nine()
    Failed asserting that 1 is identical to 0.

    Is obviously wrong. This is from the last random tests which each tests I've manually calculated myself based from the instructions, they are all wrong.

    Unless I'm missing something, HINT if ever please?

  • Default User Avatar

    6 days and i still don't get a reply.

    Last random tests keep failing, i output the given and calculate it manually myself based from requirements, expected answer is wrong.

  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

    oh that's true. i forgot to add the equal numbers on my checks :| thanks

  • Custom User Avatar

    ...All of the ?s in an expression will represent the same digit (0-9), and it won't be one of the other given digits in the expression.

    That

  • Default User Avatar

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

  • Custom User Avatar

    You're probably misunderstanding what to do, read the kata description again:

    • Given an expression, figure out the value of the rune represented by the question mark. If more than one digit works, give the lowest one. If no digit works, well, that's bad news for the professor - it means that he's got some of his runes wrong. output -1 in that case.
    • Don't get what you're saying there, could you provide the input and expected answer of those tests?
    • Already answered above.
  • Default User Avatar

    I got multple issues here:

    • ? can be from 0 to 9 so it is all possitive. A test case suggest the expected answer is -1
    • There were no mentioned rule that multiple of 1 or 0 is not counted as an answer, but the tests suggests so; atleast 2
    • Adding to my first bullet point, for test case "assertEquals(-1, solve_expression('19--45=5?'));" how is -1 an answer? It would be "=5-1" ?