Ad
  • Custom User Avatar

    ( Haskell )

    your boss is in the room

    ( My emphasis )

    In contradiction of the description however, sometimes, boss is not.

  • Default User Avatar

    For someone not super familar with this website the way in which the tests work are not familiar to me.
    It seems like a point which should probably be included in the directions, as its quite frustrating to have functioning code which is then consistently being told is wrong.

    My goal was to understand why the test was failing despite all the checks i was putting in were telling me the code was correct.
    "Don't mutate the input" does not explain nor give insight into why the test was failing, which is why i persisted on the matter, and thank you for explaining it to me in your last comment . I'll now know in future this best practice so I don't encounter the issue again of correct code failing tests.

  • Custom User Avatar

    meet[boss] = meet[boss]*2

    That's mutation of the input. Unfortunately for you, the tests aren't written in the best way and the expected solution is computed with the same dict instance that you used, but AFTER your solution has been run. So, ofc, it computes a result that is matching the data that are in the dict after you changed it. Meaning that the tests are "correct" and the problem effectively comes from your solution.

    => mutation of the input is very bad practice. Don't do that unless it's clearly specified that you can do it.

    And when someone tells you that you're doing wrong, ask yourself if that person couldn't be telling you the actual thruth before jumping on the downvote button...

  • Custom User Avatar
    1. what's your code? (spoiler flag)
    2. did you actually read what I wrote?
    3. I didn't say that your answer to that question was wrong, the problem is in your code, not in the way you do the maths.
    4. And you should bet that the problem is in your code and not in the tests, when there already are more than 150 users who completed the task in your language. That or you have to proove that the problem is in the tests and not in your code. What you're absolutely not doing currently.
  • Default User Avatar

    Average Score = 4 + 0 + 7 + 0 + 0 + 3 + 3 + 7 + 5 + 1 + 8 + 7 (as sajid is worth double) = 45
    People in Room = 11
    45 / 11 = 4.1
    This should return 'Get Out Now!'

    My script is returning Get Out Now and is being marked incorrect.

  • Custom User Avatar

    python random tests are sensible to input mutation.

  • Custom User Avatar

    don't mutate the input (that or you forgot something. But tests are "correct")

  • Default User Avatar

    Python Kata seems to have incorrect tests.

    {'tim': 4, 'jim': 0, 'randy': 7, 'sandy': 0, 'andy': 0, 'katie': 3, 'laura': 3, 'saajid': 7, 'alex': 5, 'john': 1, 'mr': 8} saajid

    Script is returning 'Get Out Now!' which according to directions is correct. However this is being marked incorrect.

  • Default User Avatar

    I found the instructions very confusing in regard to the boss; I was looking for a parameter 'boss', not realizing it was one of the names in the meeting.

  • Default User Avatar

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