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

    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

    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

    0 == False - True
    'September 5, 2014' < 'September 25, 2014' - True
    TRUE not FALSE

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    I insert the formatted PEP8 code, after publishing, all PEP8 formatting disappears.

  • Custom User Avatar

    Write the input parameters from 6 points. I redid the code, the test still fails.
    I insert the formatted PEP8 code, after publishing, all PEP8 formatting disappears.
    https://radikal.ru/lfp/c.radikal.ru/c00/1911/56/0f01d97da83e.jpg/htm

  • Custom User Avatar

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

  • Custom User Avatar

    Wrong test, the same data but different results

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    Incomprehensible description.