You will write three small functions about electromagnetic waves and digital signals.
The idea. For every electromagnetic wave, with m/s. The regions of the spectrum have approximate limits in frequency. A digital receiver reads a voltage above its threshold as a 1, and below it as a 0.
Your tasks.
wavelength, return the wavelength in m for a frequency f in Hz.region, return the name of the region for a frequency f: "radio" below Hz, "microwaves" below , "infrared" below , "visible" below , "ultraviolet" below , "X-rays" below , and "gamma rays" above that.regenerate, return a list of 1 and 0 for a list of voltages volts, with a 1 for each voltage above threshold.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…