You will write three small functions about the magnitude scale.
The idea. Five magnitudes are a factor of . The brightness of star A divided by that of star B is . A star times brighter than a star of magnitude has . Two stars together have brightness equal to the sum of their brightnesses.
Your tasks.
brightness_ratio, return how many times brighter star A is than star B.magnitude_from_ratio, return the magnitude of a star ratio times brighter than a star of magnitude m_ref.combined_magnitude, return the magnitude of two stars seen together.Run your code once to unlock the worked solution.
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…