You will write three small functions about the lenses that repair the eye. The lens is thin and sits at the eye.
The idea. For short sight, the lens has a focal length equal to minus the far point distance. For long sight, the lens makes a book at look as if it were at the near point, so . With a lens of power on the eye, an image at the near point is made by an object at , where (distances in cm, in dioptre).
Your tasks.
short_sight_power, return the power of the lens in dioptre.long_sight_power, return the power of the lens in dioptre.nearest_clear_point, return the nearest object, in cm, that is seen clearly with the lens on.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…