Four objects are weighed and their volumes are measured. You will find the density of each, the ones that float in water, and the densest one.
The idea. . An object floats in water when its density is less than .
Your tasks.
density, a dictionary from each name to its density in , rounded to 2 places.floaters, the names of the objects that float, in the order of the list.densest to the name of the densest object.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…