In [1]:
from math import pi

In [9]:
def sphere_volume(r):
    if r <= 0:
        return "The sphere has no radius"
    else:
        volume = (4/3) * pi * (r*r*r)
        return volume

In [10]:
sphere_volume(3)


Out[10]:
113.09733552923254