Ad
  • Default User Avatar

    Got error.... what it has to do with my code?

    Traceback (most recent call last):
      File "main.py", line 3, in <module>
        test.expect(validBraces( "()" ), True);
      File "/runner/frameworks/python/cw-2.py", line 22, in expect
        display('FAILED', message)
      File "/runner/frameworks/python/cw-2.py", line 14, in display
        type.upper(), mode.upper(), label, format_message(message)))
      File "/runner/frameworks/python/cw-2.py", line 9, in format_message
        return message.replace("\n", "<:LF:>")
    AttributeError: 'bool' object has no attribute 'replace'
    
  • Default User Avatar
  • Default User Avatar

    By sying first isnt it supposed to be the first appear on list compare to to one before? :x
    The word 'first' should be removed from the instructions ...

  • Default User Avatar

    ['ejjjjmmtthh', 'zxxuueeg', 'aanlljrrrxx', 'dqqqaaabbb', 'oocccffuucccjjjkkkjyyyeehh'], 1

    expected: oocccffuucccjjjkkkjyyyeehh
    result: ejjjjmmtthh

    why isn't ejjjjmmtthh the first longest string in the array?
    its longer than zxxuueeg ... and its after him (k=1).

  • Default User Avatar
  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

    No so 6kyu ...

  • Default User Avatar

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

  • Default User Avatar
    [1, 3, 2, 5, 7, 9, 4, 6, 8]
    [4, 9, 8, 2, 6, 1, 3, 7, 5]
    [7, 5, 6, 3, 8, 4, 2, 1, 9]
    [6, 4, 3, 1, 5, 8, 7, 9, 2]
    [5, 2, 1, 7, 9, 3, 8, 4, 6]
    [9, 8, 7, 4, 2, 6, 5, 3, 1]
    [2, 1, 4, 9, 3, 5, 6, 8, 7]
    [3, 6, 5, 8, 1, 7, 9, 2, 4]
    [8, 7, 9, 6, 4, 2, 1, 3, 5]
    
  • Default User Avatar

    sorry but where? i just showed you the the numbers in each block are from 1-9

  • Default User Avatar

    I cant tell why this one supposed to be False and not True....
    Here i printed every block and the numbers in it sorted from 1-9.
    This is the only test i failed on.

    1 [array([1, 3, 2]), array([4, 9, 8]), array([7, 5, 6])]
    [1, 2, 3, 4, 5, 6, 7, 8, 9]
    2 [array([5, 7, 9]), array([2, 6, 1]), array([3, 8, 4])]
    [1, 2, 3, 4, 5, 6, 7, 8, 9]
    3 [array([4, 6, 8]), array([3, 7, 5]), array([2, 1, 9])]
    [1, 2, 3, 4, 5, 6, 7, 8, 9]
    4 [array([6, 4, 3]), array([5, 2, 1]), array([9, 8, 7])]
    [1, 2, 3, 4, 5, 6, 7, 8, 9]
    5 [array([1, 5, 8]), array([7, 9, 3]), array([4, 2, 6])]
    [1, 2, 3, 4, 5, 6, 7, 8, 9]
    6 [array([7, 9, 2]), array([8, 4, 6]), array([5, 3, 1])]
    [1, 2, 3, 4, 5, 6, 7, 8, 9]
    7 [array([2, 1, 4]), array([3, 6, 5]), array([8, 7, 9])]
    [1, 2, 3, 4, 5, 6, 7, 8, 9]
    8 [array([9, 3, 5]), array([8, 1, 7]), array([6, 4, 2])]
    [1, 2, 3, 4, 5, 6, 7, 8, 9]
    9 [array([6, 8, 7]), array([9, 2, 4]), array([1, 3, 5])]
    [1, 2, 3, 4, 5, 6, 7, 8, 9]
    
  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

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

  • Loading more items...