You will write three small functions for flame light. Each takes a wavelength in nanometres.
The idea. One photon has the energy . A mole of photons has times that. Visible light runs from about 380 nm to 780 nm.
Your tasks.
photon_energy(nm). It returns the energy of one photon in joules.molar_energy(nm). It returns the energy of a mole of photons in kJ/mol.is_visible(nm). It returns True from 380 nm to 780 nm, and False outside.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…