Ad
  • Default User Avatar

    If you try to add, subtract, or dot two vectors with different lengths, you must throw an error!

    you are not supposed to raise one for equals()

  • Default User Avatar

    PYTHON

    What type of exception does the test want?

    raise Exception() didn't work

    Unexpected exception raised
    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 42, in equality
    test.expect(not b.equals(c))
    ^^^^^^^^^^^
    File "/workspace/default/solution.py", line 10, in equals
    if len(self.corr) != len(other.corr): raise Exception()
    ^^^^^^^^^^^^^^^^^
    Exception