In [1]:
from math import pi

In [2]:
def sphere_vol(r):
    r = abs(r)
    return 4/3 * pi * r ** 3

In [4]:
sphere_vol(10)


Out[4]:
4188.790204786391

In [ ]: