I am a fresh beginner in learning Python, and need some hints to understand the following exercise :
the goal is to write a script that uses the cube function in the calculus of the volume of a sphere.
Also please don't mind my grammar errors as English is not my first language. Thank you !
r = float(input("choose a number :"))
def volume_sphere(cube(r)):
pi = 3.14
cube = int(r**3)
return(cube)
volume_sphere = float(4/3*pi*cube(r))
return(volume_sphere)
volume_sphere(r)
#volume_sphere = volume_sphere(cube(r))
Is this possible to do ? This is how I understand the relationship between both functions
print("the volume of the sphere is : , volume_sphere(r)")