Ad
  • Custom User Avatar

    The beta process exists to resolve issues before potential approval. While my solution might be ridiculous to you, input modification of mutable objects is an issue. Anyways, if you stick around long enough on codewars, that and not having random tests come up a lot in beta testing.

  • Custom User Avatar
    Traceback (most recent call last):
      File "/workspace/default/.venv/lib/python3.11/site-packages/codewars_test/test_framework.py", line 112, in wrapper
        func()
      File "/workspace/default/tests.py", line 31, in large_exp
        expected = mod_power(a, b, n)
                   ^^^^^^^^^
    NameError: name 'mod_power' is not defined
    

    Your tests rely on the user also defining this function. Check my solution for what could go wrong by doing that.

  • Custom User Avatar

    from random tests:

    polar_form(31531-494i) = > '31534.8695e^(6.2675*i)' should equal '31534.8695e^(3.1259*i)'

  • Custom User Avatar

    polar_form(4+3i) = > '5e^(0.6435*i)' should equal '5e^(0.9273*i)'

    This is incorrect, as are many of the tests.
    5e^(0.6435*i) => 4+3i
    5e^(0.9273*i) => 3+4i

  • Custom User Avatar

    Approved. Thanks for contributing.

  • Custom User Avatar

    I'm on my phone so not really looking. The error I pasted above in one of the bullet points seems to imply you're not importing the the assert function.

  • Custom User Avatar

    Okay, that's better. The sample tests still fail to run without erroring.

  • Custom User Avatar
    • missing random tests
    • needs more explanation of 'simple dictionary words' => is this a preloaded variable, etc.?
    • bordering on being a duplicate (yes this is slightly more advanced, but password validation has been done before several times on codewars)
    • the sample tests error when run (spec/solution_spec.lua:1: attempt to call a nil value (global 'assert_match'))
    • this is nowhere near being a 1kyu => more realistically a hard 6 or a 5
  • Custom User Avatar

    Well, I just woke up. I believe it stemmed from the original issue referencing values. Anyways, it's fixed.

  • Custom User Avatar

    I don't think your solution is working correctly.

    n=1943 => 25 should equal ''

  • Custom User Avatar

    still an issue

    Traceback (most recent call last):
      File "/workspace/default/tests.py", line 45, in <module>
        dotest(i)
      File "/workspace/default/tests.py", line 36, in dotest
        test.assert_equals(integer_complexity(n), solution(n))
                                                  ^^^^^^^^^^^
      File "/workspace/default/tests.py", line 33, in solution
        return values[-1]
               ^^^^^^
    NameError: name 'values' is not defined
    
  • Custom User Avatar
    Traceback (most recent call last):
      File "/workspace/default/tests.py", line 46, in <module>
        dotest(i)
      File "/workspace/default/tests.py", line 37, in dotest
        test.assert_equals(integer_complexity(n), solution(n))
                                                  ^^^^^^^^^^^
      File "/workspace/default/tests.py", line 17, in solution
        if n < len(values):
                   ^^^^^^
    NameError: name 'values' is not defined
    
  • Custom User Avatar

    Glad you liked it. Translations are always welcome. Cheers.

  • Custom User Avatar

    I don't see the changes. Did you republish?

  • Custom User Avatar
    • needs random tests
    • I'm not sure I agree with a return of False if the array can't be shuffled. None would be more suitable.
  • Loading more items...