Q. Execute the following codes and find out what happens? (Libraries have been imported already; pit is the alias name for matplotlib pyplot)
(a)
A = np.arange(2, 20, 2)
B = np.log(A)
plt.plot(A, B)
(b)
A = np.arange(2, 20, 2)
B= np.log(A)
plt.bar(A, B)
(c)
X = np.arange(1, 18, 2.655)
B = np.log(X)
plt.scatter(X, Y)
Will any code produce error? Why/Why not?
Answer :-
(a)
(b)
(c)
It show error because Y is no defined.
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )