Ad
  • Default User Avatar

    '[]' i see it as an element of the array, a string.... not an array it self

  • Default User Avatar

    same error from me

  • Custom User Avatar

    Please take a look and fix it!

    Input: [35, 35, 31, 30, 164, 141, 136, 131, 126, 126, 3, 84, 87, 90, 93, 155, 158, 161, 164, 167, 133, 128, 123, 118, 113, 153, 156, 159, 2, 131, 130, 86, 87, 88, 89, 90, 196, 187, 105, 52, 198, 190]; :
    '352,31,30,164,141-131/5,1262,3,84-93/3,155-167/3,133-113/5,153-159/3,2,131,130,86-90,196,187,105,52,198,190' should equal
    '35*2,31,30,164,141-126/5,126,3,84-93/3,155-167/3,133-113/5,153-159/3,2,131,130,86-90,196,187,105,52,198,190'
    My decision is correct, because by condition:

    1. A sequence of 2 or more identical numbers is shortened as number*count
    2. Other combinations

    Input: [37, 40, 43, 46, 49, 136, 133, 130, 127, 72, 3, 117, 121, 44, 178, 13, 15, 17, 19, 20, 21]; :
    '37-49/3,136-127/3,72,3,117,121,44,178,13-17/2,19-21' should equal
    '37-49/3,136-127/3,72,3,117,121,44,178,13-19/2,20,21'
    My decision is correct, because by condition:

    1. A sequence of 3 or more consecutive numbers is shortened as first-last. This is true for both ascending and descending order
    2. A sequence of 3 or more numbers with the same interval is shortened as first-last/interval. Note that the interval does NOT need a sign
  • Custom User Avatar

    Yes, already understood.
    Thanks:)))

  • Custom User Avatar

    They are different, the first one are three elements, same level, no nesting there. The other has one element and two nested elements in the first case and two nested elements and one element, not the same structure.

  • Custom User Avatar

    Testing to see if you tried a certain short-cut
    [1,'[',']'] same as ['[',']',1]: False should equal True

    should return False

    same_structure_as([ 1, [ 1, 1 ] ], [ [ 2, 2 ], 2 ] )

    The task and solution do not match!
    It how to understand?

  • Custom User Avatar

    mmmh... I guess I really needed those fucking holidays... x/

    thx

  • Custom User Avatar

    Yes I fixed it, but Everything's working correctly could be Everything was working correctly or Everything is working correctly, I think FArekkusu meant the latter (and after I fixed it).

    @Blind4Basics: I removed your import because I already wrote it inside the function that generates the random tests and it was not needed twice.

  • Custom User Avatar

    no, nothing was working correctly: the import was lacking for python 3.6 in the test cases part.

  • Custom User Avatar

    Everything's working correctly, reset the trainer if you're having any issues.

  • Custom User Avatar

    It was enabled at some point, but there was an issue, fixed it.

  • Custom User Avatar

    Try again, maybe you'll have to click reset.

  • Custom User Avatar

    After completing all tests:
    Traceback (most recent call last):
    File "main.py", line 86, in
    doRndTests()
    File "main.py", line 82, in doRndTests
    expected = reduce( reduceFunc, recipe, 10001)
    NameError: name 'reduce' is not defined
    I do not use name 'reduce'

  • Custom User Avatar

    It seems you finally solved it, closing the Question.

  • Custom User Avatar

    I already told you that == doesn't check data type, so 0 == False - True is wrong. They're not the same. Find a way to check both value and data type.

  • Loading more items...