Computer Science, asked by dkodi039, 10 months ago

Write a program to plot a bar chart and pie chart in python to display the result 7 of a school for five consecutive years. Take years as 2015, 2016,2017,2018,2019. And percentage as 98.50,70,25,55.20,90.5,61.50

Answers

Answered by stefangonzalez246
3

Python Program to draw a bar chart

install the matplotlib in the pythone

syntax:

pip instal matplotlib

Program

import matplotlib.pyplot as plt

left=[1, 2 , 3 , 4 , 5 , 6 ]

height = [98.50, 70, 25, 55.20, 90.5, 61.50]

tick_label = [2015, 2016, 2017, 2018, 2019]

plt.bar(left, height, tick_label = tick_label, width = 0.8, color= ['red','green','blue','yellow','gray'])

plt.xlabel('x-axis')

plt.ylabel('y-axiz')

plt.title('Percentage of the school score in the year 2015-2019')

plt.show()

The given program will display the bar chart with the percentage of the school score in the year 2015-2019.

To Learn More...

  • brainly.in/question/15033223
Similar questions