Ad
  • Custom User Avatar

    Hi @georgitanev - it's very difficult to troubleshoot such OOP katas, but I had a quick look at your code and I think your mistake might be in the line:

    - (amount/ len(list(self.juise_ingredients.keys())))

    in your def pour_out (self, amount) method.

    Right now you are dividing by the number of ingredients, if I am not mistaken, but that is not how the pour_out should behave - you should divide by the total amount.

  • Custom User Avatar

    Same for me. I've checked the concentration with calculator and the same values, and in calc is giving better result. I think some tests are incorrect in Python.

  • Custom User Avatar

    Those messages are just the ones telling you your output is incorrect (the tests don't check a strict equality, they control the answer matches the expected one with a relative margin). Without more information it's impossible to help. I advice you to read the documentation: https://docs.codewars.com/training/troubleshooting/

  • Custom User Avatar

    No idea about this error either. Trying in Python.

  • Custom User Avatar

    Sorry, I meants the 8th.

  • Custom User Avatar

    Sorry, akar-0, i'm alredy saw my fault. Thanks a lot for helping!)

  • Custom User Avatar

    Damn... Don't you see the 7th column is not right? Do you really need me to detail which number is duplicated, and which number is missing?

  • Custom User Avatar

    Can you told what exactly incorrect in 7th column, because I still don't know why this text should returns False?

  • Custom User Avatar

    Look at 7th column.

  • Custom User Avatar

    Hi, guys!

    Can someone tell me, why this text
    [1, 3, 2, 5, 7, 9, 4, 6, 8]
    [4, 9, 8, 2, 6, 1, 3, 7, 5]
    [7, 5, 6, 3, 8, 4, 2, 1, 9]
    [6, 4, 3, 1, 5, 8, 7, 9, 2]
    [5, 2, 1, 7, 9, 3, 8, 4, 6]
    [9, 8, 7, 4, 2, 6, 5, 3, 1]
    [2, 1, 4, 9, 3, 5, 6, 8, 7]
    [3, 6, 5, 8, 1, 7, 9, 2, 4]
    [8, 7, 9, 6, 4, 2, 1, 3, 5] should returns False instead of True?

  • Custom User Avatar

    in half tests I got a message that my answer should be closed to (smthnum) with absolute or relative margin 1e-9. How can I do it in Python?