In [6]:
from math import pi
In [17]:
#Create a function to calculate the volume of a sphere
def sphere_volume(r):
if r > 0:
return 4*float(pi)*r*r*r/3
In [19]:
sphere_volume(9)
Out[19]:
In [ ]: