Given sphereradius, compute the volume of a sphere and assign spherevolume with the result. Use (4. 0 / 3. 0) to perform floating-point division, instead of (4 / 3) which performs integer division. Volume of sphere = (4.0/3.0) πr3 (hint: r3 can be computed using *).

Respuesta :

fichoh

The required code to obtain the volume of a sphere written in python is :

radius= eval(input('radius'))

def spherevolume():

sphereradius = radius**3

pi = 3.141592

volume_of_sphere = (4.0/3.0)*pi*sphereradius

return volume_of_sphere

Explaining the program written in python is :

radius= eval(input('Enter the value of the radius'))

def spherevolume():

#define a function named spherevolume

sphereradius = radius**3

#radius raised to the power of 3

pi = 3.141592

# define the constant pi

volume_of_sphere = (4.0/3.0)*pi*sphereradius

return volume_of_sphere

Learn more :: https://brainly.com/question/24660456