Question: * * * Second image is my current code, and the error message that shows for it . * * * Write a function plot

***Second image is my current code, and the error message that shows for it.***
Write a function plot_(f)lowrate(flowrates, times) that accepts two lists: one of flowrates and one of times, and plots flowrate against time.
The first test case runs this code:
flowrates =[4.00,6.50,3.25,3.00]
times =[0,1,2,3]
plot_(f)lowrate(flowrates, times)
which should produce the following graph:
Notes:
Your plot should have "time" for the x-label, "m(3)/(s)" for the y-label.
Your plot should have "Flow rate" for the title.
\\ import matplotlib.pyplot as plt
def plot_flowrate(flowrates, times):
"""Plot flowrate against time."""
axes = plt.gca() # Get the current Axes instance
axes.plot(times, flowrates, '-o')
axes.set_xlabel('Time')
axes.set_ylabel('m^3/s')
axes.set_title('Flow rate')
axes.grid(True)
plt.show()
Precheck only
Failed, as follows.
You forgot to use the required function 'axes'.
Sorry, but your code doesn't pass the style checks.
 ***Second image is my current code, and the error message that

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!