You will write three small functions that place a wave on the spectrum. Use m/s and eV nm.
The idea. The frequency is . The photon energy is in eV for in nm. The band comes from the wavelength:
Your tasks.
frequency, return the frequency in Hz of a wave of wavelength wavelength in m.photon_energy, return the photon energy in eV of a wave of wavelength wavelength in m.band, return the name of the band as a string: "radio", "microwave", "infrared", "visible", "ultraviolet", "x-ray" or "gamma".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…