Complete the code to import the matplotlib plotting module.
import matplotlib.[1] as plt
The matplotlib.pyplot module is imported as plt to create plots.
Complete the code to create a list of x values from 0 to 4.
x = [[1] for i in range(5)]
Using 'i' directly creates a list [0, 1, 2, 3, 4].
Fix the error in the code to fill the area between y1 and y2.
plt.fill_between(x, y1, [1])The fill_between function needs y2 as the second y-value array to fill between y1 and y2.
Fill both blanks to create y1 and y2 lists for the area chart.
y1 = [i[1]2 for i in x] y2 = [i[2]1 for i in x]
y1 is each x value multiplied by 2, y2 is each x value plus 1.
Fill all three blanks to plot the area chart with labels and show it.
plt.fill_between(x, y1, y2, color='skyblue', alpha=[1]) plt.title('[2]') plt.show() # Display the [3]
Alpha controls transparency, title sets the chart title, and plt.show() displays the plot.
