An inverse undoes a function, and its graph is the mirror image in . You will write an inverse, test the round trip, and check that mirrored points land on the inverse.
The idea. For , solving gives .
Your tasks.
f_inv, return the inverse of .round_trip to True if f_inv(f(x)) == x for every x in xs.mirrored with the mirror images of the points of , and check that each lies on f_inv.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 4 more problems and 1 Python lab. Everything you have used here stays free, always.