The figure below shows a tank made of: A conical part (reversed cone) with base...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. • If d exceeds 3R, your program displays "Tank overfilled" message and stops. If d <=0 or R <=0, it displays Wrong input message, as shown below, and stops. If d is between 0 and R, then the filled part is a reversed cone with base radius = d. volume of cylinder = r²h where h-filled height of cylinder volume of cone = r²h Sample run 1 Enter radius of the cylinder: -4.5 Radius must be positive 2R R Activate Wi Go to Settings 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. • If d exceeds 3R, your program displays "Tank overfilled" message and stops. If d <=0 or R <=0, it displays Wrong input message, as shown below, and stops. If d is between 0 and R, then the filled part is a reversed cone with base radius = d. volume of cylinder = r²h where h-filled height of cylinder volume of cone = r²h Sample run 1 Enter radius of the cylinder: -4.5 Radius must be positive 2R R Activate Wi Go to Settings
Expert Answer:
Answer rating: 100% (QA)
Step 1 SOLUTION I have solved this problem in python code with comments and screenshot for easy unde... View the full answer
Related Book For
Numerical Methods For Engineers
ISBN: 9780071244299
5th Edition
Authors: Steven C. Chapra, Raymond P. Canale
Posted Date:
Students also viewed these programming questions
-
Figure shows a cylindrical tank with a conical base. If the liquid level is quite low in the conical part, the volume is simply the conical volume of liquid. If the liquid level is midrange in the...
-
A cone with base radius R and height h is located on a horizontal table. A horizontal uniform field E penetrates the cone, as shown in Figure P24.8. Determine the electric flux that enters the...
-
1) What are the implications of CICs approach to staffing project teams? Is the company using them as training grounds for talented fast-trackers or as dumping grounds for poor performers? 2) How...
-
Solve. For following Exercises, the solutions have been started for you. For circumference applications find the exact circumference and then use 3.14 for to approximate the circumference 1. An...
-
Suppose that 0 < z < 1 for all z. Solve the logistic Equation (6) as in Exercise 39. Verify that b = e kx0 , where x 0 is the time at which z = 1/2. Equation (6) A certain nature reserve can support...
-
Estimate the magnitude of the magnetic field at location 2 in Figure P27.14 if the magnetic field magnitude at location 1 is \(0.27 \mathrm{~T}\). Note that real magnetic field lines spread out in...
-
Price and efficiency variances. Peterson Foods manufactures pumpkin scones. For January 2009, it budgeted to purchase and use 15000 pounds of pumpkin at $0.89 a pound. Actual purchases and usage for...
-
Ahmed, a foreign qualified accountant, has recently returned to Pakistan and has joined a newly incorporated company Radium Limited (RL), a subsidiary of a listed company. Ahmed has been entrusted...
-
The Kentucky Derby is held the first Saturday in May at Churchill Downs in Louisville, Kentucky. The race track is one and one-quarter miles. The following table shows the winners since 2000, their...
-
Jeanette buys decals for her car from every state she visits. She made a list of the prices: $0.99,$5.10,$1.59,$1.99, $2.99,$0.80,$1.99,$1.99,$2.99,$1.59,$0.99,$3.49, and $0.80. Find the mean.
-
List and rank what you expect your five most important life and financial goals will be at retirement time?
-
Explain what the firm's CFO must do (Issue debt or equity? Retire debt? Buy back equity and/or pay a dividend? How much?) in order to reach the target capital structure that you propose. ...
-
1. What are retained earnings and how are they calculated? 2. How do retained earnings impact a company's financial statements? 3. What is the difference between retained earnings and net income? 4....
-
Explain why the operational losses cannot be broadly managed. Why do they have to be categorized?
-
An audio engineer takes decibel readings at distances of r 1 = 1 3 m and r 2 = 2 1 m from a concert stage speaker during a sound check. When he is r 1 from the speaker, the engineer registers a...
-
Select one of the firm to deeply analyze and to prepare an investment report by the end of the course. 22/02/2022 (0503300) 2021/2022_II 2 Symbol Name Short Sell Trading Consumer Staples AGTHIA...
-
Annual dividends of ATTA Corp grew from $0.96 in 2005 to $1.76 in 2017. What was the annual growth rate?
-
As compared to the models from Probs. 20.4 and 20.5, a somewhat more sophisticated model that accounts for the effect of both temperature and chloride on dissolved oxygen saturation can be...
-
Employ the Newton-Raphson method to determine a real root for (x) = - 1 + 5.5x 4x2 + 0.5x3 using initial guesses of (a) 4.52 and (b) 4.54. Discuss and use graphical and analytical methods to explain...
-
The trajectory of a ball can be computed with Where y = the height (m), ? 0 = the initial angle (radians), ? 0 = the initial velocity (m/s), g = the gravitational constant = 9.81 m/s 2 , and y 0 =...
-
You are an options dealer who deals in non-publicly traded options. One of your clients wants to purchase a one-year European call option on HAL Computer Systems stock with a strike price of \($20.\)...
-
State Kooks law.
-
Which production process would use an assembly line? a. Continuous production b. Intermittent process c. Mass customization d. Lean production
Study smarter with the SolutionInn App