Question
Python Coding Question: Write a text-based IPO program that has the user enter the radius and height of a right circular cylinder and then displays
Python Coding Question:
Write a text-based IPO program that has the user enter the radius and height of a right circular cylinder and then displays the cylinder's diameter, cross-sectional area, wall area, surface area, and volume.
Formulas: Diameter: D = square root(4 r2 + h2) Cross-sectional area: A = r2 Wall area: W = 2 r h Surface area: S = 2 A + W Volume: V = A h
Write one function for each of the five quantities; each function should have exactly two parameters, one for radius and one for height, even those whose formulas don't involve r or h (such as surface area and volume) and should return the value. When one of the other quantities is needed, the appropriate function should be called. (For example, the formula for surface area requires the cross-sectional and wall area; the surface area function should still have just r and h for parameters and would obtain A and W by calling the crossSectionalArea and wallArea functions.) Your main( ) function is the only one that is allowed to use input( ) or print( ).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started