Six materials are dropped into water. You will make the program list the ones that float, find how much of each is under the surface, and find the density of a liquid in which ice would float only half under. Then it draws the part under the surface as bars.
The idea. An object floats if it is less dense than the liquid. Then the part under the surface is . An object that sinks is all under.
Your tasks.
floaters if the object floats.part, the percentage under the surface. A sinker is under.rho_needed, the density of a liquid in which ice floats half under, in .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…