Python program to find volume of sphere
In this python program guide, we will learn to write:
-
program to find volume of sphere in python
Program to find volume of sphere in Python
The program to calculate volume of a sphere in python is as follows:
# Owner : TutorialsInhand Author : Devjeet Roy
r = float(input('Enter radius: '))
volume = (4 * 22 * (r ** 3))/(3 * 7)
print("The volume is:", round(volume,2))
The output of the program to find volume of sphere in python is as follows:
PS C:\Users\DEVJEET\Desktop\tutorialsInHand> python code.py
Enter radius: 10
The volume is: 4190.48
Few important tips about this program:
1. We first convert the output of the input() function to float type using float() function.
2. The formula to find volume of a sphere is : 4/3 x PIE x r3
Given below is snapshot for python program to find volume of sphere:
Would you like to see your article here on tutorialsinhand.
Join
Write4Us program by tutorialsinhand.com
About the Author
Devjeet Roy
Full Stack Web Developer & Blockchain Enthusiast
Page Views :
Published Date :
Feb 02,2021