Question: Write a code in either JavaScript or Python that takes as inputs the mass and volume of a Asolid object and also the density of

Write a code in either JavaScript or Python that takes as inputs the mass and volume of a Asolid object and also the density of fluid and returns:
(a) Whether the object floats in the fluid or it sinks
(b) If it floats, how much of its volume is submerged in the fluid
(c) Using water as fluid, find the densities of the following solids: gold, copper, wood and ice and determine whether they will sink or float
(d) In the case that the material floats, determine the percentage of its volume will be submerged under water.
(e) Replace the water with alcohol and repeat the above step

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!