Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I want the code for python (Jupiter notebook) and please make it copyable. Write comments to be understandable. Check the sample run to make sure

I want the code for python (Jupiter notebook) and please make it copyable.

Write comments to be understandable.

Check the sample run to make sure it works.

Do not use magic numbers and define the constants value as a constant variable.

Name your variables based on Variable Naming Conventions rules.image text in transcribed

- The figure below shows a tank made of: - A conical part (reversed cone) with base radius=R and height=R - A cylinder with height =2R and base radius =R. - If the liquid level is quite low, in the conical part, the volume is simply the conical volume of liquid. In this case the radius of the filled part of the cone is simply equal to d - If the liquid level is somewhere in the cylindrical part, the total volume of liquid includes the filled conical part and the partially filled cylindrical part. - Write a program that prompts for and reads: - the values of d (liquid level) and R (cylinder radius). - It then computes and displays the volume of the liquid in the tank. - Note that the value of d is between 0 and 3R. R has to be positive. - Write a program that prompts for and reads: - the values of d (liquid level) and R (cylinder radius). - It then computes and displays the volume of the liquid in the tank. - Note that the value of d is between 0 and 3R. R has to be positive. - If d exceeds 3R, your program displays "Tank overfilled" message and stops. - If d

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning ASP.NET 2.0 And Databases

Authors: John Kauffman, Bradley Millington

1st Edition

0471781347, 978-0471781349

Students also viewed these Databases questions

Question

Is there any star bright enough for us to see it on a sunny day?

Answered: 1 week ago