Ad
  • 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

    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

    Mistake in Sample test:
    var array = [
    ["name1", 150, ["B", "A", "A", "C", "A", "A"]],
    ["name2", 120, ["B", "A", "A", "A"]],
    ["name3", 160, ["B", "A", "A", "A","A"]],
    ["name4", 140, ["B", "A", "A", "C", "A"]]
    ];
    Expected: ['name2', 'name4']
    name1 should be in answer, because ["B", "A", "A", "C", "A", "A"] = 150 + 20 = 170. More than 150.

  • Custom User Avatar
  • Custom User Avatar

    Please help, what type of error should i output in case the time is not in the correct format?

  • Custom User Avatar

    Excellent kata, thanks!

  • Custom User Avatar

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

  • Custom User Avatar

    Thank you! What a pity that sometimes I am very inattentive:(

  • Custom User Avatar

    Please help. I dont understand:
    python

    Traceback (most recent call last):
    File "tests.py", line 10, in
    test.assert_equals(combine(objA, objB), { 'a': 13, 'b': 20, 'c': 36, 'd': 3 })
    TypeError: combine() takes 0 positional arguments but 2 were given

    How arguments come in function?

  • Custom User Avatar

    Fine Kata, i think it plase - 7 kyu

  • Custom User Avatar

    very nice kata, thanks
    but i think it need a higher level

  • Custom User Avatar

    i dont understand, if i apply string.split('abc') method to this line then i get list the length of the elements of which is 12,43,59
    if we add the first two elements, we will get 55, and 59 - lenght of last element, mean 'abc' not right in middle

  • Custom User Avatar

    pleaze, i need help, python.
    Why in random test 'jdfibaecbecgabcacdfacgacjbebajjfbcbchfgjbfibjiegjbeiiaajfaabcadeadbejicjfgjdadcjfjjfegeiijcfhicfiaidbegdgihdfddhagdhgddb'
    must be answer True?

  • Loading more items...