A class measures the three layers of the pericarp in some fleshy fruits, in millimetres. You will find the mesocarp share, list the fruits with a thick fleshy layer, and draw a bar chart.
The idea. Each record is a tuple: the name, the epicarp, the mesocarp and the endocarp. The pericarp is the sum of the three layers.
Your tasks.
share(epi, meso, endo). It returns the mesocarp as a percentage of the pericarp.fleshy to the names of the fruits whose mesocarp is more than per cent of the pericarp, in the order of the records.best to the name of the fruit with the largest mesocarp share.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…