Ad
  • Custom User Avatar
  • Custom User Avatar

    (Py) I suggest displaying the part of “expected” and “but got” where there is a difference. Apparently, "expected" and "but got" are actually shortened to just under 90 characters.

    In each of my failed tests, the result messages look like this:

    Expected:
    ‘p -= 1;\nif (*p) do {\n  *p += 1;\n  putchar(*p);\n  putchar(*p);\n  p -= 1;\n  put...’,
    But got:
    ‘p -= 1;\nif (*p) do {\n  *p += 1;\n  putchar(*p);\n  putchar(*p);\n  p -= 1;\n  put...’
    

    The displayed part of the two shortened strings of “expected” and “but got” match.

  • Custom User Avatar

    please tell me, how is this syntax called:

    key = 0..__eq__
    

    is this syntax comparable to MMA, eg. Select[list, EqualTo[0]]

  • Custom User Avatar

    In the example in the description, all intervals except the last one have a dif (= upper - lower) of 14. The last interval should be [77, 92 ] and has a dif of 15. The largest observed value is 89. Why should the last interval not be [77, 91]?

    I understand why the upper limit of the last interval cannot be above 100.

    Can someone please give me a hint?

  • Custom User Avatar

    Could it be that the solution is not unique? Please take a look at these 2 sample tests:

    sample test 1:
    
    s='!?!!??!!!?'
    s='!?    !!!?'
    s=' ?    !!! '
    
    <FAILED::>' ?    !!! ' should equal '      !!!?'
    
    sample test 2:
    
    s='?!!?!!?!!?!!!??!!!??!!!??!!!??!!!??'
    s='?  ?!!?!!?!!!??!!!??!!!??!!!??!!!  '
    s='?  ?  ?!!?!!!??!!!??!!!??!!!  !!!  '
    s='?  ?  ?  ?!!!??!!!??!!!  !!!  !!!  '
    
    <FAILED::>'?  ?  ?  ?!!!??!!!??!!!  !!!  !!!  ' should equal '?  ?  ?  ?!!!  !!!  !!!  !!!??!!!??'
    
  • Custom User Avatar

    you do know that next year has already passed, right?

  • Custom User Avatar

    in py we are given this highly informative error message:

    Value is not what was expected
    

    a greek pythia would say it exactly like this

  • Custom User Avatar

    how funny: replace(",", ",")

  • Custom User Avatar

    My solution is completely nonsensical, but it passed.

    Should that really be possible?

  • Custom User Avatar

    Python: In the description it says: He told you that the sub function may or may not be here, if no sub-function return undefined, ...

    The undefined part of sentence should be replaced by e.g. an empty string in Python

  • Custom User Avatar

    you could use the switch (?x)

    please take a look at my solution

  • Custom User Avatar

    Surely I am misunderstanding something because the task has been solved many many times in python.
    The python sample test contains this example (2025 June):

     @test.it("Ex2")
        def basic_test_cases():
            test.assert_equals(fire_and_fury("FIREYYFURYYFURYYFURRYFIRE"), "You are fired! I am really furious. You are fired!")        
      
    

    But in the notes of the description it says: If multiple of the same words are found in a row then plural rules apply.

    Wouldn't one rather expect: "You and you are fired! I am really furious."

    I would very much appreciate a hint.

  • Custom User Avatar

    A task in the regular expression category should use regular expression if it wants to be best practice.

  • Custom User Avatar

    thanks, that makes sense

  • Custom User Avatar

    In many random tests, all my test rows match except for a few, e.g.

    correct answer:
    "'D...'" 9!  Xy14lmTDftz-
    YtlLqmJ3Q!  "Gli9..."
    
    my answer:
    "'D...'" 9!  Xy14lmTDft-
    zYtlLqmJ3Q!  "Gli9..."
    

    In this example, the last letter of line (n) is shifted to the beginning of line (n+1) compared to the reference solution.

    Can I assume that if "123\n4567" is a correct solution, then "1234\n567" is also a correct? Is there a rule to make the solution unique?

  • Loading more items...