In [1]:
from math import pi

In [6]:
def area_of_sphere(r):
    if r < 0:
        return False
    a = 4/3 * pi * r**3
    return a

In [7]:
area_of_sphere(2)


Out[7]:
33.510321638291124

In [ ]: