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.
Please ignore this solution--when refactoring I forgot to remove let mut final_string = String::new();
You're right!
I think you weren't supposed to change the 'function signature'.
Thank you.
The exact same question was answered in the third post below yours.
Magnitude is not a method, it should be implemented as a property.
The tests for my solution pass except for exit... curious if this is an issue with the test (code in python):
Traceback (most recent call last):
File "main.py", line 19, in
test.assert_approx_equals(Vector(examples[0]).magnitude, 3.741, 0.001)
File "/runner/frameworks/python/cw-2.py", line 84, in assert_approx_equals
div = max(abs(actual), abs(expected), 1)
TypeError: bad operand type for abs(): 'method'
I didn't change anything- default was set to 3.8, but it ran correctly this time
Currently 3.8 is the only available version.
change the language to 3.8 and it'll work
This comment is hidden because it contains spoiler information about the solution