Here is class 12 computer science Unit 8 [Type B] solutions for Sumita Arora back exercise assignment. Below includes both textual and video solutions wherever required. View all the answers in assignment for chapter 8 and for all chapters here.Watch all tutorials for chapter 8.
(a) No error (b) No error (c) The code will execute with no error but it will have an improper visualization due to the wrong value as parameter passed on.
(a) A = np.arange(2, 20, 2) B = np.log(A) plt.plot(A, B) plt.title('log') plt.xlabel("X axis") plt.ylabel("Y axis") plt.show() (b) A = np.arange(2, 20, 2) B = np.log(A) plt.bar(A, B) plt.title('log') plt.xlabel("X axis") plt.ylabel("Y axis") plt.show()
import matplotlib.pyplot as plt import numpy as np # code for A vs B's every value*1.2 A = np.arange(2, 20, 2) B = np.log(A) B1 = B*1.2 plt.plot(A, B) plt.plot(A, B1) plt.show() # code for A vs B's every value*-1.2 A = np.arange(2, 20, 2) B = np.log(A) B1 = B*-1.2 plt.plot(A, B) plt.plot(A, B1) plt.show()
Improper argument passed is the cause of error while plt.pie() requires different argument. ValueError: Invalid RGBA argument: 6
Clear Doubts with Computer TutorIn case you’re facing problems in understanding concepts, writing programs, solving questions, want to learn fun facts | tips | tricks or absolutely anything around computer science, feel free to join CTs learner-teacher community: students.computertutor.in
You cannot copy content of this page