A family has weighed its waste for a week. You will add up each bin, find the wet share, and work out how much compost the wet waste can give. The program then draws a bar chart of the two bins.
The idea. Each kind of waste has a mass in kilograms and a bin, "wet" or "dry". About % of the mass of wet waste remains as compost.
Your tasks.
bin_total, return the total kilograms that go into the bin called bin_name.wet and dry with your function.wet_share to the wet waste as a percentage of all the waste, to one decimal place.compost to % of the wet waste, to one decimal place.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…