Computer Science
Write a program to input the radius of a sphere and calculate its volume (V = 4/3πr3)
Python
Python Data Handling
47 Likes
Answer
import math
r = float(input("Enter radius of sphere: "))
v = 4 / 3 * math.pi * r ** 3
print("Volume of sphere = ", v)
Output
Enter radius of sphere: 3.5
Volume of sphere = 179.59438003021648
Answered By
22 Likes
Related Questions
Write a program to calculate amount payable after simple interest.
Find the volume of the cylinder (πr2h) as shown:
Radius = 8 cm
Height = 15 cmWrite a program to calculate the area of an equilateral triangle. (area = (√3 / 4) * side * side).
Write a program to calculate amount payable after compound interest.