Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Program import math def surfaceareaofcylinderij area2mathpiii2mathpiij printSurfa...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