0 out of 464 challenges solved
Write a Python function `surface_area_of_sphere(radius)` that calculates the surface area of a sphere given its radius. The formula for the surface area of a sphere is: \[ A = 4 \pi r^2 \] where: - \( A \) is the surface area, - \( r \) is the radius of the sphere, - \( \pi \) is a mathematical constant approximately equal to 3.14159. #### Example Usage ```python [main.nopy] print(surface_area_of_sphere(10)) # Expected output: 1256.6370614359173 print(surface_area_of_sphere(15)) # Expected output: 2827.4333882308138 print(surface_area_of_sphere(20)) # Expected output: 5026.548245743669 ```
import math def surface_area_of_sphere(radius): """ Calculate the surface area of a sphere given its radius. Args: radius (float): The radius of the sphere. Returns: float: The surface area of the sphere. """ # Implement the formula for the surface area of a sphere pass