logo CodeStepByStep logo

sphere_volume

Language/Type: Python math parameters return

Write a function named sphere_volume that accepts a radius as a parameter and returns the volume of a sphere with those dimensions. For example, the call of sphere_volume(2.0) should return roughly 33.510321638291124. The formula for the volume of a sphere with radius r is:

volume = 4/3 * π * r3

Function: Write a Python function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.