Let's say we want to display the percentages in the pie chart, rounded to 2 decimal places.
Specify the autopct parameter in the given snippet so that it results in a plot below:
import matplotlib.pyplot as plt
plt.pie([1521.16, 253.45, 333.99, 215.50],
labels=['Household', 'Healthcare', 'Entertainment', 'Misc.'],
# your code here
)
plt.show()The answer should be in the following format:
autopct = ...Hint
Take a closer look at the Display the value section of the theory