Question: 7.) Write a function called surface_area_of_cylinder that takes two arguments. The first is a float representing the radius of a cylinder. The second is
7.) Write a function called surface_area_of_cylinder that takes two arguments. The first is a float representing the radius of a cylinder. The second is a float representing the height of a cylinder. The function calculates and prints the surface area of a cylinder with the given radius and height. You will need to import the math module and use the math.pi constant. The formula is: SA = 2r + 2rh Here are some examples of calling the function with different arguments. (The code executed is in blue, the output produced is in green): surface_area_of_cylinder (10.0, 10.0) The surface area of a cylinder with radius 10.0 and height 10.0 is 1256.6370614359173 surface_area_of_cylinder (0.0, 1.0) The surface area of a cylinder with radius 0.0 and height 1.0 is 0.0
Step by Step Solution
3.46 Rating (156 Votes )
There are 3 Steps involved in it
Program import math def surfaceareaofcylinderij area2mathpiii2mathpiij printSurfa... View full answer
Get step-by-step solutions from verified subject matter experts
