import matplotlib.pyplot as pltx = [4, 9, 21, 55, 30, 18]labels = ['math', 'history', 'chemistry', 'physics', 'biology','Enrlish']explode = [0, 0.01, 0.01, 0.02, 0.03, 0]plt.pie(x, labels=labels, explode=explode,shadow=True,autopct='%1.1f%%',startang…