• Duplicate.

  • yeah, accidentally i returned None when n and the list size were equal. you were right

  • You were returning None when a list was expected. I've fixed this, and now one will get a message directing the error rather than the apparently meaningless error log.

  • i solved the kata and all the tests are ok. but when i click the 'attempt' button i get this error:
    Traceback (most recent call last):
    File "/runner/frameworks/python/cw-2.py", line 111, in wrapper
    File "main.py", line 30, in edge_case_tests
    assertFloatArrayEqual(moving_average([50,51,52,53,54],5), [52.0])
    File "main.py", line 12, in assertFloatArrayEqual
    raise e
    File "main.py", line 5, in assertFloatArrayEqual
    final = [abs(x[0]- x[1]) < epsilon for x in zip(actual,expected)]

  • Thank you for the quick reply and fix

  • Click on RESET

  • disregard, i think you fixed it

  • this is what i get on another one now. If its me plese let me know.

    [407.66666666666663, 388.3333333333333, 328.6666666666667, 324.0, 392.0] should equal [407.6666666666667, 388.3333333333333, 328.6666666666667, 324.0, 392.0]

  • Can you please check again?

  • Fixing.......

  • Why am I getting dinged for not having enouch decimal places and rounding in my answer?

    [212.0, 226.33333333333331, 240.99999999999997, 236.33333333333334, 173.66666666666666] should equal [212.0, 226.33333333333334, 241.0, 236.33333333333334, 173.66666666666666]

  • Updated the description to make it more readable, and approved as 7 kyu despite of average rank of 6 kyu.

    7 kyu kata represent a beginner programming level. At this level the kata will generally challenge 
    users on their core language and API reference knowledge. Tasks such as:
        Iterating arrays and returning a subset of values <---- which is exactly what one have to do here.
  • Because window's size is greater than length of the list.

  • Now the expected value is computer first, modifying input doesn't affect tests.

  • Loading more items...