Question
Python programming question: Cylinder parameters. Write an IPO program (text-based or graphical) that has the user enter the radius rr and height hh of a
Python programming question: Cylinder parameters.
Write an IPO program (text-based or graphical) that has the user enter the radius rr and height hh of a right circular cylinder and then displays that cylinder's diameter, cross-sectional area, wall area, surface area, and volume (formulas follow). In order to do this you should 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 rr or hh (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(). Formulas: Diameter: D=square root of (4r^2+h^2) Cross-sectional area: A=r2A=r2 Wall area: W=2rh Surface area: S=2A+W Volume: V=Ah
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