Ad
  • Custom User Avatar

    This particular random test seems to not want the sin(-5 * x) == part of the expression:

    'sin(-5 * x)  ==  - 5 cos(x)^4 sin(x) + 10 cos(x)^2 sin(x)^3 - sin(x)^5' should equal '- 5 cos(x)^4 sin(x) + 10 cos(x)^2 sin(x)^3 - sin(x)^5'
    

    It's not consistent because other random tests do require that prefix.

  • Custom User Avatar

    Instructions don't match the result:

    # Example 1:
    decode_void_whispers("Hello World")
    # Returns: "sDOOL dLIOV"
    # Explanation:
    # - Remove every 3rd character: "HloWrd"
    # - Invert ASCII values (158 - ord(c)): "sDOOL dLIOV"
    

    However:

    >>> ''.join(chr(158 - ord(c)) for c in 'Hello World')
    'V922/~G/,2:'
    

    What am I missing?

    I can see how that result was actually derived but what's with the "158 - ord(c)" then?

  • Custom User Avatar
    ' O| /Bn' should equal ' O-\n| /Bn'
    

    There is no vowel after the 'O'. Why does it need to be broken up?

  • Custom User Avatar

    Error when submitting:

    File "/workspace/default/tests.py", line 8
        def test.(vignere_cipher()):
                ^
    SyntaxError: expected '('
    
  • Custom User Avatar
    src/test/java/CraftingCheckerTest.java:9: error: cannot find symbol
        private static final String STONE = CraftingChecker.STONE;
                                                           ^
      symbol:   variable STONE
      location: class CraftingChecker
    src/test/java/CraftingCheckerTest.java:10: error: cannot find symbol
        private static final String STICK = CraftingChecker.STICK;
                                                           ^
      symbol:   variable STICK
      location: class CraftingChecker
    2 errors
    

    I think it would make more sense for the tests to stand alone and not depend on static constants in the solution.

  • Custom User Avatar

    Error when submitting solution:

    Traceback (most recent call last):
      File "/workspace/default/tests.py", line 4, in <module>
        Test.assert_equals(sys_call_buffer("get"), "NULL")
        ^^^^
    NameError: name 'Test' is not defined. Did you mean: 'test'?
    

    Did you mean 'test'?

  • Custom User Avatar
    999999999 999999999 1999999998
    Expected: equal to "Overflow"
    Actual: "No overflow or underflow"
    

    It did not overflow though. Am I missing something?

  • Custom User Avatar
        @test.it("Cut one value")
        def cut_one_value():
            arr = [1,1,2,2,1,7,0,1,3,0,1]
            test.assert_equals(lawnmower(arr, 5, 2), [1,1,2,2,1,0,1,3,0,1])
    

    I have a question about this example.

    With a lawnmower of length 5, it will consider the range [0,1,3,0,1]. In this range, the median is 1. However, 3 is more than 2 times the median in this range. So why is 3 not cut?

  • Custom User Avatar

    Wait. Why are we flooring the result?

  • Custom User Avatar

    If we are supposed to write random_valid_key() and random_invalid_key(), then the kata description should specify that. But that doesn't make sense because we can then write trivial implementations of those functions that will make any solution pass.

  • Custom User Avatar

    Still seeing it though. Here is what it looks like when I submit a solution:

    image

  • Custom User Avatar
    NameError: name 'random_valid_key' is not defined
    
    NameError: name 'random_invalid_key' is not defined
    

    Still an issue.

  • Custom User Avatar

    Okay, thanks so much!

  • Custom User Avatar

    LOL. I was actually wondering if the precision issue was part of the challenge.

  • Custom User Avatar

    Can I have some worked examples of the match percentage calculation? What formula do you use to derive the percentage?

    The description is fine but the specifics are a mystery to me.

  • Loading more items...