You will write four small functions that tie the colour of light to the band gap of a crystal.
The idea. A photon of wavelength (in nm) has energy in eV. It can make an electron-hole pair if is at least the gap. Heat lifts a share of the electrons.
Your tasks.
photon_energy, return the energy in eV of a photon of the given wavelength in nm.cutoff_wavelength, return the longest wavelength in nm that can make a pair across the given gap in eV.can_make_pair, return True if a photon of the given wavelength has at least the energy of the gap.thermal_factor, return for a gap in eV and a temperature in K. Use k = 8.617e-5 eV/K.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…