In [10]:
from math import pi
In [27]:
def volume(r):
if r < 0:
pass
else:
vol = (4/3 * pi)* (r**3)
return vol
In [28]:
volume(2)
Out[28]: