170k views
1 vote
Spherevolume = (4.0 / 3.0) * pival * sphereradius * sphereradius * sphereradius ;

1 Answer

1 vote

Answer:

The program in Python is as follows:

pival = 3.142

sphereradius = float(input("Radius: "))

spherevolume =
(4.0 / 3.0) *
pival * sphereradius *
sphereradius * sphereradius

print(spherevolume)

Step-by-step explanation:

The missing part of the program is to calculate the volume of a sphere.

The program in Python (in the answer section) is implemented using the already used variables.

Initialize pi

pival = 3.142

Get input for radius

sphereradius = float(input("Radius: "))

Calculate the volume

spherevolume =
(4.0 / 3.0) *
pival * sphereradius *
sphereradius * sphereradius

Print the calculated volume

print(spherevolume)

User Jinish
by
4.7k points