You will write three small functions about the redshift of a galaxy.
The idea. The redshift is . For small the speed is with km/s, and Hubble's law gives the distance .
Your tasks.
redshift, return from the wavelength seen and the laboratory wavelength.speed, return the speed in km/s from the redshift.distance_mpc, return the distance in megaparsecs from the speed and .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…