A bathtub faucet has a maximum flow rate of 3 gal/min. The tub is rectangular (3 ft long x 2 ft wide x 1.5 ft deep). Although th
e tub drain is plugged, water leaks out at 0.01 gal/min. There is an overflow opening which allows water to drain from the tub. The overflow opening is 1 ft above the bottom of the tub. How long will it take the tub to fill to 1 ft deep with the faucet on at its maximum flow rate? If the area of the overflow opening is 0.5 in2 and water drains with a velocity of 1.8 ft/sec, will the tub ever overflow if you turn the faucet on at the maximum flow rate? If so, how long will it take? (Note: since the overflow opening is very small, assume that water drains through the entire opening once the water is 1 ft deep).
The solution and complete explanation for the above question and mentioned conditions is given below in the attached document.i hope my explanation will help you in understanding this particular question.
Let “w” and “L” be the width and length of the rectangle. “p” and “a” are perimeter and area For python, w=int(input(“width”)) l=int(input(“length”)) a= w*l p=2*w+2*l print(str(a), str(p)