All problems
Total Derivative Along a Path
Problem
For f(x(t), y(t)), the total derivative is df/dt = f_x * x'(t) + f_y * y'(t).
Given the partial derivatives and the coordinate velocities, return the total derivative.
Hint
Sum the partial derivatives weighted by the corresponding velocities.
Test cases
case 1
in: [1,2,3,4]
expected: 11
case 2
in: [2,-1,0.5,0.5]
expected: 0.5
case 3
in: [-3,4,1,-2]
expected: -11
Starter codePython
def total_derivative_along_path(fx, fy, dx, dy):
# Your code here
pass3 test cases · run your code against them in the editor