You will write three small functions that turn the temperature and the radius of a star into what we see. The Sun has .
The idea. Wien's law gives the peak wavelength, in metres. The classes from the hottest are O, B, A, F, G, K and M, with the lower limits , , , , and for the first six. The luminosity compared with the Sun is .
Your tasks.
peak_nm, return the peak wavelength in nanometres.spectral_class, return the letter of the class.luminosity, return the luminosity compared with the Sun.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…