Python program to calculate the volume of a sphere

In this python basic program, we will calculate the volume of a sphere using the formula (4/3*pi*r^2).

Steps to solve the program
  1. Take radius as input through the user.
  2. Calculate the volume of a sphere using the formula (4/3*pi*r^2).
  3. Where pi is equal to 3.14 and r is the radius of the sphere.
  4. Print the output.
				
					r = float(input("Enter radius of the Sphere: "))
volume = 4/3*(3.14*r**2)

print("Volume of Sphere: ",volume)
				
			

Output :

				
					Enter radius of the Sphere: 5
Volume of Sphere:  104.66666666666666
				
			

find the square root of a number.

perform mathematical operations on two numbers.

Leave a Comment