0 out of 464 challenges solved
Write a Python function `surface_area_cylinder` that calculates the surface area of a cylinder given its radius and height. The formula for the surface area of a cylinder is: \[ \text{Surface Area} = 2 \pi r^2 + 2 \pi r h \] Where: - \( r \) is the radius of the cylinder's base. - \( h \) is the height of the cylinder. #### Example Usage ```python [main.nopy] surface_area_cylinder(10, 5) # Expected output: 942.4777960769379 surface_area_cylinder(4, 5) # Expected output: 226.1946710584651 surface_area_cylinder(4, 10) # Expected output: 351.8583772020568 ```
import math def surface_area_cylinder(radius, height): """ Calculate the surface area of a cylinder. Args: radius (float): The radius of the cylinder's base. height (float): The height of the cylinder. Returns: float: The surface area of the cylinder. """ # Placeholder for the solution pass