KnowledgeBoat Logo
|

Informatics Practices

Write Python code to draw the following Bar graph representing the number of students in each class.

Write Python code to draw the following Bar graph representing the number of students in each class. Societal Impacts, Informatics Practices Preeti Arora Solutions CBSE Class 12

PyPlot

3 Likes

Answer

import matplotlib.pyplot as plt
x = ['IX', 'X', 'XI', 'XII']
y = [40, 45, 35, 45]
plt.bar(x, y)
plt.show()
Output
Write Python code to draw the following Bar graph representing the number of students in each class. Societal Impacts, Informatics Practices Preeti Arora Solutions CBSE Class 12

Answered By

2 Likes


Related Questions