You will write three small functions that test a limit by computer. The checker uses a function with a hole, a function with a jump and a plain polynomial.
The idea. A limit at looks at just to the left of and just to the right of . If the two sides head for the same number, the limit exists. Take for "just beside".
Your tasks.
left_value(f, a). Return f(a - h) with h = 0.000001.right_value(f, a). Return f(a + h) with the same h.limit_exists(f, a). Return True when the left and right values differ by less than 0.0001, and False otherwise.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…