Ad
  • Custom User Avatar

    im stucked, and i know that if i give up and see the solutions i gonna feel so stupid.
    i can copy paste this coments in every kata i do basically :(

  • Default User Avatar
  • Custom User Avatar

    [TypeScript]
    The types for the TypeScript translation are incorrect.

    String represents the gloabl string object, it is not the right type to use for a primitive string.
    string should be used instead for the parameter.
    See https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#the-primitives-string-number-and-boolean
    and https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html#general-types
    in the TypeScript handbook.

    Kinda ironic for a kata tagged with "string" and "fundamentals".

  • Custom User Avatar

    #11b32/3q8:0z:vV

    excellent kata

  • Custom User Avatar

    approved

  • Custom User Avatar

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

  • Default User Avatar

    Thanks for the feedback :)

  • Default User Avatar

    I suggest unpublishing the kata before it gets retired.

    1. The idea of this kata is by no means novel as there are many DNA-decoding/-encoding katas.
    2. IMO "This kata aims to get you to use your knowledge of bitwise operators." is a bit off and
    3. "The bin function has been disabled in Python." is kind of pointless. It's easy to get the binary representation of an int without this function (see this example).

    Regards, suic

  • Custom User Avatar

    sorry, offtop.
    Skills:i have e^(πi)+1 skills ???
    How is this possible?
    Dear AvyJIT Sensei, the "incorrigible liar" state is impossible.
    You either take off the cross, or put on your underpants ...
    Because the number of your skills is much more than 0. :-)

  • Custom User Avatar

    done. I added the sample tests to the test suite at the same time

  • Custom User Avatar

    actually, sample tests is the only place where the named argument is used. What do you prefer? removing them in sample tests or adding them in the full test suite?

    forget that, I'll update the test suite.

  • Custom User Avatar

    In random tests:

    Traceback (most recent call last):
      File "/workspace/default/src/codewars-test/codewars_test/test_framework.py", line 111, in wrapper
        func()
      File "tests.py", line 65, in trig
        check(f_sin, df_sin, f_cos, df_cos, 0)
      File "tests.py", line 57, in check
        compare(func1, func2, x)
      File "tests.py", line 44, in compare
        test.assert_approx_equals(f1(x, True), f2(x, True))
    TypeError: __call__() takes 2 positional arguments but 3 were given
    

    When the function is called, it must have a optional grad argument. The functions will be called with only one argument. If then function is called without the grad argument, return the value of the function, and if grad = True, return the value of its derivative.

    In all typical Python libraries (even in standard libraries like itertools) this would be taken as "grad is a keyword-only argument", and the implied usage from the description, examples and sample tests all implies the same, so this usage in random tests is incorrect; it should be called with grad=True.

  • Default User Avatar

    I'm slapping myself in the face right now. But yeah, overall good kata.

  • Default User Avatar

    This was one of the most satisfying katas to solve

  • Default User Avatar
    1. This site is CODEwars not MATHwars! Please provide clarification on the math concepts (or at least a link to RELEVANT information.) I am here to learn coding concepts and a huge portion of these kata are not coding issues but solving math problems.

    2. At least for python, the corner cases are impossible to debug. There is no feedback as to what the inputs were, or what the math operation was that caused the failure.
      For example...

    Time: 570ms Passed: 26 Failed: 4 Exit Code: 1
    ...
    -0.0 should be close to 1.0 with absolute or relative margin of 1e-09
    ...

    Wonderful!!!! /scarasm!

  • Loading more items...