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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!