Write a function my_cylinder(r,h), where r and h are the radius and height of a cylinder, respectively, and the output is a list [s, v] where s and v are the surface area and volume of the same...


Write a function my_cylinder(r,h), where r and h are the radius and height of a cylinder, respectively, and the output is a list [s, v] where s and v are the surface area and volume of the same cylinder, respectively. Recall that the surface area of a cylinder is 2π r2 + 2πrh, and the volume is π r2h. Assume that r and h are 1 by 1 floats.


Test Cases:


In: my_cylinder(1,5)


Out: [37.6991, 15.7080]


In: my_cylinder(2,4)


Out: [62.8319, 37.6991]

Nov 15, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here