Here is one day's waste from a city ward, sorted into its parts. You will find how much can be composted or recycled, and how much must still go to the landfill.
The idea. Wet waste (food and garden) can be composted. Dry waste (paper, plastic, glass, metal) can be recycled, but only the share that is collected clean. Inert waste (dust, stones) goes to the landfill.
Your tasks.
total, return the total waste of the day, in kilograms.wet_share, return the wet waste as a percentage of the total.to_landfill, return the kilograms still sent to the landfill when all the wet waste is composted and the share recycled of each dry part is recycled.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…