Ad
  • Custom User Avatar

    Same error in js version

  • Custom User Avatar

    Read the description again(especially the lower part).
    You also have to provide an equals function for the class.
    And a function which gives string representation of the vector __str__ instead of toString in python.

    Also, your functions are returning lists, instead of vectors. The output should also be vector instances.
    (This is why you get the above mentioned error. The test code checks if your output equals the expected, but there is no equals function on the returned list)

    And, both dot and norm functions are wrong. Again, I would suggest carefully reading the description to see what those functions are supposed to return.

  • Custom User Avatar

    subtract method "[ 4, 6, 8 ]" - "[ 3, 4, 5 ]" = "[ 1, 2, 3 ]" and method toString returns '(1,2,3)'. Output say Value is not what was expected. Is Ok js version?