You will write three functions that find the velocity and the speed of a moving point from its position, and tell whether it is speeding up. The position is a function of time that returns a pair (x, y).
The idea. The velocity is the derivative of the position. For a tiny step h, the central difference is very close to it, one component at a time. The speed rises where .
Your tasks.
velocity(r, t). Return the pair (vx, vy) by the central difference with h = 0.000001.speed(r, t). Return the length of the velocity.speeding_up(r, t). Return True when . Find from the change of the velocity over a step of 0.001.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…