You will write three functions for a prism. All angles are in degrees.
The idea. A ray with angle of incidence meets a prism of angle and index . Snell's law gives at the first face. Then . Snell's law again gives the angle at the second face, and . At minimum deviation, . Python's math.sin needs radian, so change with math.radians and math.degrees.
Your tasks.
deviation, return the angle of deviation for a ray with angle of incidence i.minimum_deviation, return the smallest deviation from and .refractive_index, return from and the minimum deviation delta_m.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.