Complete the code to import the matplotlib library for plotting.
import [1] as plt
We import matplotlib.pyplot as plt to create plots.
Complete the code to enable interactive mode in matplotlib.
plt.[1]()The ion() function turns on interactive mode in matplotlib.
Fix the error in the code to update the plot dynamically.
plt.plot(x, y)
plt.[1]()After plotting, plt.draw() refreshes the figure in interactive mode.
Fill both blanks to create a dictionary comprehension that filters data points with y values greater than 5.
filtered_points = {x: y for x, y in data.items() if y [1] 5 and 'point' [2] x}The comprehension keeps points where y is greater than 5 and the key contains 'point'.
Fill all three blanks to create a dictionary comprehension that converts keys to uppercase, keeps values, and filters values greater than 10.
result = { [1]: [2] for k, v in data.items() if v [3] 10 }This comprehension changes keys to uppercase, keeps values, and filters values greater than 10.