Ad
  • Custom User Avatar

    New Rust translation. The previous one had an outdated Rust version and could not be approved anymore.

  • Custom User Avatar

    Traceback (most recent call last):
    File "/workspace/default/tests.py", line 1, in
    from solution import square_sums
    ImportError: cannot import name 'square_sums' from 'solution' (/workspace/default/solution.py)

  • Custom User Avatar

    Still accepts wrong answers though: non-complete chains instead of False.

  • Custom User Avatar

    I have a Python solution that is very fast on my computer. I use a decorator to cache some results. I do this without importing any modules, but the code doesn't work on CodeWars. What am I doing wrong?

  • Custom User Avatar
    actual = square_sums_row(i)
    # ...
    actual.sort()
    test.assert_equals( actual, list(range(1,i+1)), 'missing numbers')
    

    Don't sort the output as is. You're breaking solutions with precomputed/cached results, and all the user will see on failure is a useless error message simply saying "sums of adjacent numbers should be squares" with no information about what's actually happening.

  • Custom User Avatar

    Which complexity is enough to solve this kata?

  • Custom User Avatar

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

  • Custom User Avatar

    Ruby 3.0 should be enabled, read this to learn how to do it

    Please organize the structure of test fixture as following (although it has been mentioned in the attached link, I'm repeated here again)

    describe "<This message should describe the categories of test groups inside this block>" do
      it "<A short message describing this test group>" do
        expect(...).to eq(...) #Assertions
        #Or Test.assert_equals(user_response, reference_response)
      end
    end
    
  • Custom User Avatar

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

  • Custom User Avatar

    I don't know what to do with this error. can you help me? What is the reason?

    Traceback (most recent call last):
    File "main.py", line 26, in
    doTests()
    File "main.py", line 18, in doTests
    a,b = actual[:-1],actual[1:]
    TypeError: 'bool' object is not subscriptable

    Code work pretty good, I passed all tests but because of error i can't pass this kata
    Passed: 18 Failed: 0 Exit Code: 1

  • Custom User Avatar

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

  • Custom User Avatar