You will write three functions that a pollution control board might use: the sulfur dioxide that leaves a chimney, the cut in dust that a city needs, and the number of stations that fail a standard.
The idea. Each tonne of sulfur makes of sulfur dioxide, and a scrubber that removes removal percent lets the rest through. The cut needed from a level to a limit is percent, or if the level already meets the limit.
Your tasks.
so2_released, return the tonnes of sulfur dioxide released from coal tonnes with sulfur percent sulfur and a scrubber that removes removal percent.cut_needed, return the percentage cut from level c to limit, or 0 if c is not above the limit.failing, return how many readings in the list readings are above limit.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…