Hello all,
I know this question was asked and answered before but I can’t seem to solve the issue with my code.
In exercise 1 I’m getting the following error: AssertionError: Check that you are finding the 4 words.
In step 1 I have created a dictionary of lower case words from the split sentence. Then, initialized avg to be a zero vector with the same shape as any_word. Count is initialized to 0.
In step 2 I looped over w in the dictionary and checked that w is in the any_word list, I added the mapped w to the average and increased count by 1. Finally I calculated the average by dividing by the count.
I checked that no indentation is present before the the final if (per previous posts).
Any hints are much appreciated.
P.S. I refrained from copying my code and explained what I did instead, hope this is fine, if it is not, I can delete the explanation.