Create a function to calculate the volume of a sphere


In [31]:
import math

In [32]:
from math import pi

In [33]:
def sphere_volume(r):
    return ((4/3)*pi)*(r**3)

In [34]:
sphere_volume(3)


Out[34]:
113.09733552923254

In [ ]:


In [ ]: