FunctionRacerProblemsRace

Mark the Average

EasymatplotlibPython

Draw ys against xs as a line, and add a horizontal line across the whole chart at the mean of ys. Return the figure.

Checked: the lines.

Example 1

xs [1,2,3,4]
ys [2,4,3,7]
draws
The chart to draw in example 1 of Mark the Average

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More matplotlib problems