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
- Take radius as input through the user.
- Calculate the volume of a sphere using the formula (4/3*pi*r^2).
- Where pi is equal to 3.14 and r is the radius of the sphere.
- 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