Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Testing for -3 10 9 -7 -3 9 10 -7 -8 -8 9 1 10 2 -3
It should work for random inputs too: [-3, 10, 9, -7, -8] should equal [-3, 9, 10, -7, -8]
But what's wrong with this output?
The first number that repeats is -3, then -10 then 9 and so on.
magnitude
is a property, not a method. Nothing to fix.there is error in python test
test.assert_approx_equals(Vector(examples[0]).magnitude, 3.741)
shoud be
test.assert_approx_equals(Vector(examples[0]).magnitude(), 3.741)
please fix it in all tests
The kata needs to be solved
in-place
, you are using O(N) space for keeping a copy of thea
arrayThank you
Better to use lists extend()