Ad
  • Default User Avatar

    Dude... WHAT? You just hardcoded every possible result?!

  • Default User Avatar
  • Default User Avatar

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

  • Default User Avatar

    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
    func()
    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)]