In [8]:
def get_sphere(r):
if r >= 0:
return 4/3*math.pi*(r**2)
else:
print("Radius cannot be negative!")
In [11]:
get_sphere(3)
Out[11]:
In [ ]: