Help needed on my code

Please note that a solid knowledge of basic linear algebra is a prerequisite for success here. If you are not familiar with how matrix multiplication works, you should put this course on “pause” and take a look at some linear algebra courses, e.g. the one from Khan Academy.

Here is a thread which shows some examples of how to use np.dot and transpose that may be relevant to this computation.