You will write a numerical slope and use it to test a derivative formula, an implicit slope and a parametric slope. A computer cannot prove a formula, but it catches nearly every slip.
The idea. A slope taken on both sides of , , is very close to for a tiny . For a parametric curve, is the slope of divided by the slope of , both taken against .
Your tasks.
slope(f, x). Return (f(x + H) - f(x - H)) / (2 * H).param_slope(xf, yf, t). Return the slope of yf at t divided by the slope of xf at t.matches(f, formula, points). Return True when formula(p) is within 0.001 of slope(f, p) for every p in points.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…
With Standard, you also open 12 more problems, 2 Python labs and 1 extra course. Everything you have used here stays free, always.