Ad
  • Custom User Avatar

    The input is not in the error message, as I said before.

    "It should work for random inputs too: 6030 should equal 6003" # < expected answer
    #                                        ^
    #                                     your wrong answer
    
  • Custom User Avatar

    The initial value is: "6003"?

    No, you got this part wrong.

  • Default User Avatar

    Double reply so you see the updated message: it seems, indeed, that this is due to you reading the error message incorrectly.

    You posted in your original message:

    "59884848495583 should equal 59884848483559" and then you said that 59884848495583 is the initial value: NO this is your mistake - you are not reading error message correctly.

    In the statement x should equal y - x is what your code is currently returning and y is the actual correct answer.

    As stated earlier - you should add the following to your code: print(n) - now you will see what the actual input values you are being passed are.

    Just to be 100% clear:

    59884848459853 <- input value of `n`
    59884848495583 <- your current (incorrect) answer
    59884848483559 <- expected correct answer
    
  • Custom User Avatar

    You most probably read logs incorrectly, and you mistake actual values returned by your solution, with input values.
    I changed the way how tests are organized to give better feedback on failure, hopefully this will make it easier for you to spot your mistake.

  • Default User Avatar

    Of the values that you are showing, only the value 5988... is a fixed test that we can reproduce easily.

    However, already you are reading it wrong - you claim the initial value is: 59884848495583

    but the test is actually using input: 59884848459853

    I have bolded the digits you are getting wrong.

    Make sure you are reading tests correctly - also in your code, add a print(name_of_input) somewhere if you want to double check.

  • Custom User Avatar

    Obviously, you're misreading the logs, the first value in the error message is what your function wrongly returned, not the input value. To see what it was, print it. Not a kata issue:

    Python Completions 10347

  • Custom User Avatar

    obviously, this is a value that should be less than the initial one

    But you do not show anywhere what the initial value is?