18. WRITE A PROGRAM TO PLOT A LINE CHART TO DISPLAY THE CHANGING WEEKLY ONION PRICES FOR FOUR WEEKS.

Solution :- 

import pandas as pd
import matplotlib.pyplot as plt
week =[1,2,3,4]
prices=[48,60,45,85]
plt.plot(week,prices)
plt.xlabel(‘week’)
plt.ylabel(‘Onion prices’)
plt.show()

Output :-