Ad
  • Default User Avatar

    I don't see any errors in the tests.

  • Custom User Avatar

    That line is part of your code, print the input, try your code with the same input in your IDE.

  • Custom User Avatar

    I have a trable with random test on Python:

    STDERR
    Traceback (most recent call last):
    File "/workspace/default/tests.py", line 94, in
    test.assert_equals(by_state(s), sol)
    File "/workspace/default/solution.py", line 17, in by_state
    if i[-1] in dct:
    IndexError: list index out of range

    Although in my IDE this test pass successfully

  • Custom User Avatar

    Thanks for your explanation, now I fully understood the task :)

  • Custom User Avatar

    In the second example, the first four lines each have a leading space. Leading spaces are counted normally, like all other characters. I'm sorry that this fact wasn't made clear enough.

  • Custom User Avatar

    Could someone explain me?
    Why in the second example the result will be (1, 2) when in the description write: 'Strings can vary in length, and if they do, align them to the left.'
    I think lki in descriotion result would be a (0, 2) (zero index of second string) isn`t it?

  • Custom User Avatar

    someone, expain me, please:

    in case arr.length = 110, i = 61, n = 36

    Expected: -1, instead got: [858, 731, 252, 534, 836, 716, 861, 783, 186, 984, 90, 839, 168, 26, 942,
    415, 847, 65, 35, 422, 143, 159, 235, 198, 355, 298, 44, 255, 995, 730, 843, 403, 306, 171, 636, 996]

    why does testcase expect -1 ?

  • Custom User Avatar
  • Default User Avatar

    oh thanks, got it

  • Custom User Avatar

    no one can get more than 200 points, it's just a rule. if you have more, it is "downgraded" to 200. so jack got 200 points

  • Custom User Avatar

    Thank you @Chrono79, I had not read the description correctly.

  • Default User Avatar

    Why ['Jack Bradley', 200, ['B', 'B', 'A', 'A', 'A', 'A', 'B', 'A']] isn't hacked?
    Sum of scores is equal 20+20+30+30+30+30+20+30=210 plus extra points and total cant be greater than 200, so why it isn't?
    Trying to pass random tests

  • Custom User Avatar

    @jesusmanuelir@gmail.com There is no error, your code is wrong. Check the description again.

  • Default User Avatar

    Hi, this is because your code passes the Sample Tests but not the Random Tests. So, you will need to revisit the challenge and alter your logic. Look closely at the red text and see what tests you're not passing as a means to fixing your code. Best of luck!

  • Custom User Avatar

    Hello, i am having an issue with this kata, all the fixed tests are passed correctly, but every time i click atempt, arround 10 random tests apear in red. Is there someone else havign a similar problem?

  • Loading more items...