Issue with plot the arrays
Doubleclick here for the solution.
<! Your answer is below:
a = np.array([1, 1])
b = np.array([1, 1])
Plotvec2(a, b)
print("The dot product is", np.dot(a,b))
>
This code is giving error.
Error: Plotvec2 is not defined.
4
votes
kalgandl
shared this idea
2 comments

Python Co commented
You first have to run the code in cell 2. This will define the Plotvec2 function and then your code will work.

James Clark commented
Same here. I used this instead:
plt.plot(a,b)