FunctionRacerProblemsRace

Value in Between

EasySciPyPython

The points (xs[i], ys[i]) are joined by straight lines, with xs increasing. Return the height of that line at each position in at.

Example 1

xs [0,10]
ys [0,100]
at [2.5,5]
returns [25.0,50.0]

A quarter of the way from 0 to 100 is 25, and halfway is 50.

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 SciPy problems