16.WRITE A PROGRAM TO PLOT A BAR CHART FROM THE SCORES OF FOUR STUDENTS IN FIVE DIFFERENT SUBJECTS. MAKE SURE THAT BARS ARE SEPARATELY VISIBLE

Solution :- 

import pandas as pd
import matplotlib.pyplot as plt
sub =[‘English’,’History’,’Ip’,’Psychology’,’Pol Sc’]
samaira=[89,87,96,94,91]
aryan=[67,89,56,45,67]
ashish=[56,45,52,34,57]
paras=[46,32,37,48,42]
plt.bar(sub,samaira,label=’samaira’)
plt.bar(sub,aryan,label=’aryan’)
plt.bar(sub,ashish,label=’ashish’)
plt.bar(sub,paras,label=’paras’)
plt.legend(loc=2)
plt.xlabel(“Subject”)
plt.ylabel(“marks”)
plt.show()

Output :-