python program to calculate the volume of a sphere. please help
Answers
Answered by
1
Answer:
Combine the whole program:
#impotr math package to use math.pi for the value of PI.
import math.
#take radius of the sphere from user.
r=float(input("Enter the r of a sphere"))
#calculate the surface area of sphere.
s_area=4*math.pi*pow(r,2)
#calculate the volume of sphere.
volume=(4/3)*math.pi*pow(r,3)
Kindly mark as brainliest
Similar questions
Physics,
3 months ago
Biology,
3 months ago
Computer Science,
3 months ago
Sociology,
6 months ago
Hindi,
6 months ago