Respuesta :
The volume of a sphere is
[tex] \dfrac{4}{3} \pi r^3 [/tex]
As the hint suggests, we can avoid the use of powers, if we recall that
[tex] r^3 = r \cdot r \cdot r [/tex]
So, we can rewrite the volume as
[tex] \dfrac{4}{3} \pi r \cdot r \cdot r [/tex]
Since we're given two variables storing the values of [tex] \pi [/tex] and the radius, we can write the line of code as follows:
spherevolume = (4.0 / 3.0) * pival * sphereradius * sphereradius * sphereradius ;
The program which computes the volume of a sphere written in python 3 goes thus :
- spherevolume = (4.0/3.0)*pival*(sphereradius)**3
sphereradius = r
pival = 3.142
The formula for obtaining the volume of a sphere can be expressed thus :
- Volume = (4.0/3.0) × πr³
Hence, using Python :
spherevolume = (4.0/3.0)*pival*(sphereradius)**3
print(spherevolume)
# displays the calculated volume of the sphere based on the value of the Radius supplied.
Learn more :https://brainly.com/question/2800358