You need to dedent line 12 - i.e. you want to return dot_product only after the for loop ended.
I understand that this is homework and you need to do what you are asked to do. However, for your information, using get function like this get_vector is not pythonic. i.e. you can just access the a property (of cource you want more meaningful name)
I understand that this is homework and you need to do what you are asked to do. However, for your information, using get function like this get_vector is not pythonic. i.e. you can just access the a property (of cource you want more meaningful name)
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs