You will write three functions that explore by computer. The checker compares them with .
The idea. For large the value is close to . How large must be for the difference to be small? You try until it is.
Your tasks.
compound(n). Return .power_form(k, n). Return .n_needed(k, tolerance). Try in order. Return the first power of ten for which power_form(k, n) differs from math.exp(k) by less than tolerance.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…