Question: This program requires a main function and two custom functions for cylinders. Both functions take the radius and height of a cylinder as an
This program requires a main function and two custom functions for cylinders. Both functions take the radius and height of a cylinder as an argument. One function returns the surface area of the cylinder. The other void function prints the volume of a cylinder to three decimal places. The main function should prompt the user for the radius (as a float) and execute the custom functions. The value returned by the surface area function should be printed accurate to four decimal places. Use the math module to get the value of pi. The formula for the surface area of a cylinder is 2 * pi * radius * (radius + height). The formula for the volume of a cylinder is pi * radius^2 * height. Input prompts and output should be formatted as in the example output. Example Output Enter the radius of the cylinder: 4.3 Enter the height of the cylinder: 6 The surface area of the cylinder is 278.2823 The volume of the cylinder is 348.528
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
