Ad
  • Custom User Avatar

    The question is poorly written.
    It's unclear what the "parameter" is.
    Is it 10 (the "nth" term)
    or a series(unspecified)
    or the series given as an example
    or something else?
    Please have someone review your kata before it's published.
    PLEASE!

  • Custom User Avatar

    Basic Test Cases
    Test Passed
    True should equal False
    Test Passed
    Test Passed

    I believe "a" and "c" conform:
    1 element each
    values are different
    lengh of each element string == 1
    Why do they not? Help please!

  • Custom User Avatar

    Huge Values of n (From 100000 up to 1000000)
    STDERR
    /workspace/default/tests.py:18: DeprecationWarning: np.bool is a deprecated alias for the builtin bool. To silence this warning, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here.
    Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    sieve = numpy.ones(n // 3 + (n % 6 == 2), dtype=numpy.bool)

    Execution Timed Out (12000 ms)
    Test routine failed to generate large primes:- Problem?

  • Custom User Avatar

    TypeError: find_screen_height() takes 1 positional argument but 2 were give
    I pass ONE arg: [1024, "4:3"] i.e.= ONE list with 2 elements
    Comment?

  • Custom User Avatar

    217 , ratio solution is 32:8
    Should it be reduced to 4:1?

  • Custom User Avatar

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

  • Custom User Avatar

    error in test routine:
    Traceback (most recent call last):
    File "/workspace/default/tests.py", line 2, in
    from solution import digits_product
    File "/workspace/default/solution.py", line 15
    pass # code away!
    ^
    IndentationError: unindent does not match any outer indentation level

  • Custom User Avatar

    :There are many errors in the solution to the last sample, indicated by '*':

    "you've gotta dacne like teehr's nbdooy wachintg, love like ylo'ul neevr be hrut, sing like teehr's nbdooy leiinnstg, and live like it's haeevn on earth."
     *      *           *                             *    *                          *    *                             *    *    *                   *
    
  • Custom User Avatar

    : "103 -> 10 -> 1 -> 1, 4 elements altogether."
    4 elements??
    10,1,1 = 3 elements

  • Custom User Avatar

    def fn(arr):
    print("In fn:", arr)
    return

    for n in range(len(tests)):
    # an array of strings NOT two arrays
    data = tests[n] # TWO arrays/lists
    print()
    print("Data[0] (The Problem) =", data[0])
    print("Data[1] (The Solution??) =", data[1])

    x = fn(data)
    

    pass

    '''
    1.The convention in Codewars is that the sample data
    is presented as ,.

    1. You have observed this in your INSTRUCTION SECTION.

    2. your check/evaluation/validation of the submitted code has a simple bug.

    3. You REVERSE the itemS, and my code fails.

    OF COURSE IT FAILS!!
    FIX YOUR DAMNED CODE AND STOP BEING SO PIG-HEADED ABOUT IT.

    THIS IS MY LAST MISSIVE ON THIS MATTER.
    THE MORE YOU PROTEST, THE WORSE YOU LOOK.

    It's said,
    "When you're dead, you don't know it, but other people do."
    It's the same when you're stupid!

    Data[0] (The Problem) = ['i', 'to', 'beg', 'life']
    Data[1] (The Solution??) = ['beg', 'life', 'i', 'to']

    Passing in the twin array:
    In fn: [['i', 'to', 'beg', 'life'], ['beg', 'life', 'i', 'to']]
    [ Answer ], [ Problem ]

    '''

  • Custom User Avatar

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

  • Custom User Avatar

    7 kyu - Sort by String length
    What you are saying is that this ONE kata can present the data in reverse, contrary to every other kata in the system, WITHOUT EXPLANATION that this is the case.

    Clearly your evaluation code is WRONG.
    It indexes the two arrays in reverse. Easy to fix!

    How can you pretend to defend such an obvious error.
    Your explanation is unacceptable and should be reviewed by your peers.

    If you have a look at my profile, you will see that at 4kyu I am no longer a novice Please do not insult me with yout puerile responses.

  • Custom User Avatar

    The argument passed to the fn is already sorted BY LENGTH.
    ["i", "to", "beg", "life"] (tests[0][0])

    The second element, the "solution" is unsorted:
    ["beg", "life", "i", "to"] (tests[0][1])

    Just look at the problem as listed below!!!
    PLEASE!!

    Is
    tests = [
    [["i", "to", "beg", "life"], ["beg", "life", "i", "to"]],
    [["", "pizza", "brains", "moderately"], ["", "moderately", "brains", "pizza"]],
    [["short", "longer", "longest"], ["longer", "longest", "short"]],
    [["a", "of", "dog", "food"], ["dog", "food", "a", "of"]],
    [["", "bees", "eloquent", "dictionary"], ["", "dictionary", "eloquent", "bees"]],
    [["a short sentence", "a longer sentence", "the longest sentence"], ["a longer sentence", "the longest sentence", "a short sentence"]],
    ]

  • Custom User Avatar

    problem/soution #1
    [["i", "to", "beg", "life"], ["beg", "life", "i", "to"]],

    ["i", "to", "beg", "life"] is already sorted by length

    ["beg", "life", "i", "to"] this is the task

    task and solution are reversed?

  • Custom User Avatar

    def sort_by_length(arr): 7kyu

    The solution in each case appears before its problem
    Fix??

  • Loading more items...